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 548716 - First text field when adding account (e.g. "Login ID") isn't focused by default
First text field when adding account (e.g. "Login ID") isn't focused by default
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Accounts
2.23.x
Other Linux
: Normal minor
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2008-08-20 18:24 UTC by Matthew Paul Thomas (mpt)
Modified: 2009-05-30 08:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthew Paul Thomas (mpt) 2008-08-20 18:24:36 UTC
Empathy 2.23.6, Ubuntu Intrepid Ibex alpha 3

1. In the Accounts window, click "Add".
2. Choose an account type, and click "Create".
3. Start typing your login ID.

What should happen: The text you typed should appear in the relevant field.

What actually happens: Nothing, because the field isn't focused by default.
Comment 1 Guillaume Desmottes 2009-01-13 00:44:35 UTC
Bug still present in master.
Comment 2 Danielle Madeley 2009-04-22 07:32:10 UTC
Adding the gnome-love keyword.

Should be possible to call gtk_widget_grab_focus() from somewhere generic in the account widget setup stuff.
Comment 3 Dimitris Zenios 2009-05-28 15:18:24 UTC
I fixed the bug.Its want just a gtk_widget_grab_focus() call.

Anyway my branch where these bug is fixed is located at  

git://github.com/paranomos/empathy-branch.git
Comment 4 Guillaume Desmottes 2009-05-28 15:52:36 UTC
Thanks a lot for your contribution. Few comments:

- account_widget_set_default_focus(gui,settings->vbox_settings,"entry_userid");
You should add a space before the '(' and between parameters.
See http://live.gnome.org/Empathy/ about our conding style conventions.
This comments applies to your other function calls.

- account_widget_setup_widget: remove the 2 blank lines you added

- account_widget_generic_format_param_name, accounts_widget_generic_setup: don't remove this blank line

- accounts_widget_generic_setup: you added trailing spaces

- account_widget_set_default_focus: remove useless blank lines and trailing spaces.

- empathy-account-widget: you introduced trailing spaces as well

- you should add gtk_widget_grab_focus()


I suggest you to use "git diff origin/master..." to see the diff of your patch. Trailing spaces will be displayed in red.

You should also run "make check" to be sure you didn't introduce any coding style regression.
Comment 5 Dimitris Zenios 2009-05-28 16:51:34 UTC
Really sorry about the coding style regressions,this is my first time.

i think i have addressed all your requests.I didn't understand what you meant about gtk_widget_grab_focus() it's already in accounts_dialog_update_account().All the changes are in the same git branch i mentioned above 
Comment 6 Xavier Claessens 2009-05-29 09:21:08 UTC
It is improving... A few more comments to get perfect :)

 - You should add space between function parameters: foo (arg1, arg2);
 - account_widget_setup_widget() --> you add an extra blank line for no reason.
 - Public functions must be in the empathy_ namespace. So account_widget_set_default_focus() should be renamed to empathy_account_widget_set_default_focus().
 - Instead of using ugly g_object_get_data(), you can connect the "realize" signal on the widget that should grab focus, and call gtk_widget_grab_focus() in its callback. That signal is emitted on all widgets once it (or a parent) gets added in a top level window. Like that you can also remove the "widget" param of account_widget_set_default_focus(). And you can also remove the "main_widget" param of accounts_widget_generic_setup().

That's all, thanks for your work!
Comment 7 Dimitris Zenios 2009-05-29 16:20:12 UTC
I think it should be ok now.Thanks everyone for the help

Btw the branched location changed.Now is

git clone git://github.com/paranomos/empathy-bug--548716.git

Thanks a lot again
Comment 8 Guillaume Desmottes 2009-05-29 16:31:04 UTC
Thanks to you for your contribution. :)

I didn't look at your branch (will let Xavier check it) but note that you shouldn't create a new git repo each time. You should have one and create a new branch for each bug/feature you are working one and keep the master as a clone of origin/master.
Comment 9 Dimitris Zenios 2009-05-29 16:48:17 UTC
thank you so much for your suggestion

As i told you before i am new to all this :)
Comment 10 Xavier Claessens 2009-05-29 21:08:57 UTC
Great, just a question: Why did you rewrite the GPL header? I see no difference...

http://github.com/paranomos/empathy-bug--548716/commit/b791fbe2eaedfcb48e1a9d56c511d1f146c50b72
Comment 11 Xavier Claessens 2009-05-29 21:16:29 UTC
Note that usually we create only one repository named "empathy.git", and push all our branches to it. You don't have to create a new repository for each fix.
Comment 12 Dimitris Zenios 2009-05-29 22:06:28 UTC
Yes Guillaume Desmottes told me about the branches.On the second part about the GPL header i don't know why.I don't remember doing such thing.Maybe it was by mistake since I am using gedit to edit the files.

I am really sorry.Never the less I hope the bug is fixed (with the proper way)  and everybody is happy :)
Comment 13 Xavier Claessens 2009-05-30 08:52:17 UTC
I changed that and pushed. Thanks for your contribution!