GNOME Bugzilla – Bug 654552
IRC configuration should expose 'username', and probably have an 'advanced' section.
Last modified: 2011-07-25 11:49:16 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.
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.
Created attachment 191897 [details] Screenshot of said patch This shows what the patch will look like.
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.
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.
Created attachment 191968 [details] [review] This should be it
Created attachment 192019 [details] [review] A patch to add an advanced section to the IRC config page
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.
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.
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
Created attachment 192237 [details] [review] IRC accounts: make labels the same width. This addresses Nick's concern on
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’.)
Created attachment 192239 [details] [review] IRC: validate 'username' parameter.
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?
looks good, please merge :)
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.