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 663631 - Improve the preferences dialog
Improve the preferences dialog
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: rygel-preferences
git master
Other Linux
: Normal minor
: ---
Assigned To: Jens Georg
Depends on:
Blocks:
 
 
Reported: 2011-11-08 15:03 UTC by David King
Modified: 2012-02-06 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
improve the preferences dialog (28.09 KB, patch)
2011-11-08 15:03 UTC, David King
needs-work Details | Review
fix translation of Any string (28.35 KB, patch)
2011-11-08 15:33 UTC, David King
needs-work Details | Review
updated patch based on comment #2 (30.45 KB, patch)
2012-01-24 18:26 UTC, David King
committed Details | Review

Description David King 2011-11-08 15:03:01 UTC
Created attachment 200996 [details] [review]
improve the preferences dialog

Attaching a work-in-progress patch which improves the preferences dialog by adding tooltips to the widgets inside the dialog, and updates the sensitivity of the remove and clear buttons based on the content of the URI model.

There are still a few issues to solve:

* clear and close buttons use stock items and have the same mnemonic, at least in English
* the code to save the dialog settings does a string comparison which explicitly matches the string ‘Any’, which is marked as translatable, so it should be using the translated string in the code too
* the interface combo box has no active entry on startup, despite setting it in the gtkbuilder file, and forcing the setting through code also does not work

Solving the translatable string problem should be straightforward. One way of solving the duplicate mnemonics would be to remove the clear button from the dialog, allow multiple selection and delete the selected rows from the model. The inactive combo box entry might be caused by the context-available and context-unavailable signal handlers not checking for an active item and updating the combo box appropriately.
Comment 1 David King 2011-11-08 15:33:30 UTC
Created attachment 201010 [details] [review]
fix translation of Any string

Fixed the translatable string.
Comment 2 Jens Georg 2011-11-16 18:00:02 UTC
Review of attachment 201010 [details] [review]:

I wonder if we shouldn't move to the new +/- style thing, given that gnome-sharing isn't going to appear soon.

Code is missing curlies for single-line statements, also the patch does do some unrelated things :)

::: src/ui/rygel-media-pref-section.vala
@@ +56,3 @@
+        this.tree_selection = (TreeSelection)
+            builder.get_object (TREE_SELECTION);
+        assert (this.tree_selection != null);

Indentation is wrong and the "as" looks way cooler ;)

::: src/ui/rygel-network-pref-section.vala
@@ +58,3 @@
         var iface = this.iface_entry.get_active_text ();
 
+	// FIXME: This check does not work if ANY_NETWORK has been translated!

The "Any" entry should always be the first. Can't we check that instead of doing the string compare?
Comment 3 David King 2012-01-24 18:26:00 UTC
Created attachment 206003 [details] [review]
updated patch based on comment #2

I added the +/- Toolbar and ToolButtons, switched the Boxes to Grids, changed the interface handling to treat the first item specially, removed the clear button, used the ‘as’ operator, added the curly braces and hopefully fixed the indentation.
Comment 4 Jens Georg 2012-02-05 12:08:21 UTC
Review of attachment 206003 [details] [review]:

Small issues: +/- buttons are too large and the - button has the + image. I can fix that, but for some reason there's a line below the toolbar that I can't really explain.
Comment 5 Jens Georg 2012-02-06 19:09:07 UTC
(In reply to comment #4)
> Review of attachment 206003 [details] [review]:
> 
> Small issues: +/- buttons are too large and the - button has the + image. I can
> fix that, but for some reason there's a line below the toolbar that I can't
> really explain.

→ Wrong toolbar style. Will also fix.