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 654552 - IRC configuration should expose 'username', and probably have an 'advanced' section.
IRC configuration should expose 'username', and probably have an 'advanced' s...
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Accounts
3.1.x
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-13 13:17 UTC by Will Thompson
Modified: 2011-07-25 11:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
A bad mockup of how I suggest we might want the account page to look. (66.89 KB, image/png)
2011-07-13 13:17 UTC, Will Thompson
  Details
Patch implementing most of wjt's suggestions (27.03 KB, patch)
2011-07-13 15:58 UTC, Rob
reviewed Details | Review
Screenshot of said patch (28.66 KB, image/png)
2011-07-13 15:59 UTC, Rob
  Details
This should be it (25.59 KB, patch)
2011-07-14 15:01 UTC, Rob
none Details | Review
A patch to add an advanced section to the IRC config page (26.59 KB, patch)
2011-07-15 09:38 UTC, Rob
needs-work Details | Review
Add an advanced section to the IRC configuration page (14.94 KB, patch)
2011-07-19 11:02 UTC, Will Thompson
none Details | Review
IRC accounts: make labels the same width. (1.20 KB, patch)
2011-07-19 11:02 UTC, Will Thompson
none Details | Review
IRC: rename “user_name” regex to “nick_name” (1.82 KB, patch)
2011-07-19 11:02 UTC, Will Thompson
none Details | Review
IRC: validate 'username' parameter. (2.00 KB, patch)
2011-07-19 11:02 UTC, Will Thompson
none Details | Review
Screenshot of the IRC dialog as of this patch (62.68 KB, image/png)
2011-07-19 11:30 UTC, Will Thompson
  Details

Description Will Thompson 2011-07-13 13:17:08 UTC
Created attachment 191879 [details]
A bad mockup of how I suggest we might want the account page to look.

Currently the IRC account configuration window shows the following options:

 • Network
 • Nickname
 • Password
 • Real name
 • Quit message

For some servers, you need to use a specific username to authenticate, which may not match your nickname. Idle currently defaults to the user's local username for the 'username' parameter.

For instance, on IRC I go by “wjt” and my Linux username is “wjt” but perhaps my corporate IRC server needs me to be “thompsonw” in the USER message.

So I propose to expose the Username parameter in the IRC configuration, and to add an Advanced section (as seen in the Jabber configuration) to hide away Real name, Quit message and Username from most users. I think we could also add a note that passwords are optional on most servers, like we have a hint for what your Facebook username should be.

I've drawn a terrible mockup in the Gimp. Attached.

Open questions:

• Is the phrasing on the password hint right? Do we need this at all? (see bug 644987 for another issue with the password field)
• Should we have a hint explaining what the username parameter does, or does that live in Help?
• Should we show the local Unix username in the “Username” field, to indicate that that's Idle's default? We explicitly set Full name to the user's local full name; we could do the same for Username, overriding the default with setting the default explicitly.
Comment 1 Rob 2011-07-13 15:58:36 UTC
Created attachment 191895 [details] [review]
Patch implementing most of wjt's suggestions

Most of this works, except the username field isn't connected to anything and the password note doesn't show up.
Comment 2 Rob 2011-07-13 15:59:55 UTC
Created attachment 191897 [details]
Screenshot of said patch

This shows what the patch will look like.
Comment 3 Guillaume Desmottes 2011-07-14 11:56:30 UTC
This is the whole file not the patch. Can you please attach a git patch?

Connecting username is easy, just have to add one line in empathy_account_widget_irc_build(): see empathy_builder_get_file.
Comment 4 Nick Richards 2011-07-14 14:18:21 UTC
I really like this improvement, however one suggestion - in the 'awesome mockup' the text fields in the advanced section have the same alignment as those above whilst in the patch screenshot, they're only aligned on each other. It'd be nicer if they were shown as in the mockup.
Comment 5 Rob 2011-07-14 15:01:49 UTC
Created attachment 191968 [details] [review]
This should be it
Comment 6 Rob 2011-07-15 09:38:25 UTC
Created attachment 192019 [details] [review]
A patch to add an advanced section to the IRC config page
Comment 7 Will Thompson 2011-07-15 10:53:25 UTC
Review of attachment 192019 [details] [review]:

I tested this out, it's looking pretty good. A few issues below.

I think you could get all the fields to be aligned as Nick suggests by adding a Size Group (from Miscellaneous) and then adding each label widget to that group. This would make all the labels take the same width as the longest label, which would also make the entries line up.

::: libempathy-gtk/empathy-account-widget-irc.ui
@@ -291,3 @@
-        </child>
-        <child>
-        <child>

So the field you're removing is called "entry_fullname"…

@@ +405,3 @@
+                </child>
+                <child>
+                    <property name="left_attach">1</property>

…but the replacement is called "entry_realname". As a result, when I run empathy-accounts and select an IRC account, I get this on the terminal:

** (empathy-accounts:21855): WARNING **: Builder is missing object 'entry_fullname'.

@@ +486,3 @@
+            <property name="xalign">0</property>
+            <property name="xpad">3</property>
+                    <property name="label" translatable="yes">Real name:</property>

The comment for translators here isn't true: the string *is* wrapped in the UI. (I think this came from the Facebook hint, which predates Gtk+ being able to wrap things of its own accord.)

So, let's take the hint out entirely.
Comment 8 Will Thompson 2011-07-18 13:57:22 UTC
While testing the patch, I also noticed that we need to validate what's entered in the “Username” field. (If we don't, Idle returns an error from RequestConnection(), we hit <https://bugs.freedesktop.org/show_bug.cgi?id=39334> in MC, and the user sees “Network error”. \o/ Telepathy.)

I can't figure out how this works for the other fields from a quick scanning of the code.
Comment 9 Will Thompson 2011-07-19 11:02:42 UTC
Created attachment 192236 [details] [review]
Add an advanced section to the IRC configuration page

-Move the Real Name and Quit Message to the advanced section
-Add a new Username field to the advanced section
Comment 10 Will Thompson 2011-07-19 11:02:47 UTC
Created attachment 192237 [details] [review]
IRC accounts: make labels the same width.

This addresses Nick's concern on
Comment 11 Will Thompson 2011-07-19 11:02:49 UTC
Created attachment 192238 [details] [review]
IRC: rename “user_name” regex to “nick_name”

The 'account’ parameter in Telepathy, to which this regex applies, is
the ‘nickname’ in IRC parlance.

(I'm about to add a regex for what IRC calls ‘usernames’.)
Comment 12 Will Thompson 2011-07-19 11:02:53 UTC
Created attachment 192239 [details] [review]
IRC: validate 'username' parameter.
Comment 13 Will Thompson 2011-07-19 11:30:20 UTC
Created attachment 192240 [details]
Screenshot of the IRC dialog as of this patch

Annoyingly the GtkLabel for the hint leaves space for three lines of text, even though it's not possible to resize the window to make it narrow enough to force the label to wrap to three lines. So as you can see in this screenshot there's lots of ugly empty space around the label—annoying!

We can set the label's yalign to 0 to make the text be right up against the field it's hinting about, at the cost of even more ugly space between it and the Advanced thing. Votes?
Comment 14 Xavier Claessens 2011-07-25 11:19:05 UTC
looks good, please merge :)
Comment 15 Will Thompson 2011-07-25 11:49:16 UTC
http://git.gnome.org/browse/empathy/commit/?id=d9bb5b999731c247b845ba7e97393d2e25bcfeca

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.