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 599153 - Accounts dialog should display the status of accounts
Accounts dialog should display the status of accounts
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Accounts
2.28.x
Other Linux
: Normal enhancement
: ---
Assigned To: Felix Kaser
Depends on:
Blocks:
 
 
Reported: 2009-10-21 09:31 UTC by Guillaume Desmottes
Modified: 2011-08-29 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Wireframe for account state in the settings dialogue (170.74 KB, image/png)
2009-11-16 11:10 UTC, Nick Richards
Details

Description Guillaume Desmottes 2009-10-21 09:31:55 UTC
It should be easy to visualize the status of an account (connecting, connected, failed to connect, ...) in the accounts dialog.

This information should probably be clearly displayed in the right pane of the dialog.
Comment 1 Guillaume Desmottes 2009-10-21 09:32:25 UTC
Jonathan started to implement this:
http://git.collabora.co.uk/?p=user/jtellier/empathy.git;a=shortlog;h=refs/heads/accounts-dialog
Comment 2 Guillaume Desmottes 2009-10-21 11:52:56 UTC
It would be good to share code with the error displayed in the contact list so maybe we should port it to use GtkInfoBar first (bug #599176).
Also, in case of error, a "Retry" button should be displayed (bug #587216).
Comment 3 André Klapper 2009-10-28 17:16:43 UTC
Currently 17 Empathy tickets are set as GNOME 2.30 blockers, hence mass-removing.
Guillaume: Please use normal Target Milestones instead. If you really think that this specific issue here is a 2.30 blocker then please restore the GNOME target and set corresponding importance values.
Comment 4 Felix Kaser 2009-11-11 20:07:51 UTC
what about using a gtkinfobar for the account name, protocoll picture and retry button instead of the string - image combination which is in use atm?

was this your initial idea or did you think of something else?

This could be part of the gtkbuilder generic.ui
Comment 5 Guillaume Desmottes 2009-11-12 14:28:19 UTC
So, the goal of this bug is to display the status of the account in the right pane. Between the title of the account and the widget containing its settings we should have a frame showing the status of the account:

- if the account is connected: [status icon] $status_message
- if the account is connecting: [throbbler] "Connecting"
- if the account is disconnected: [error icon] $reason   where $reason is the connection error (as we have in the contact list info bar)
- if the account is offline: "[offline status icon] Offline" or "Offline: no network" if the connectivity object doesn't detect any connection.
Comment 6 Guillaume Desmottes 2009-11-12 14:29:42 UTC
Adding Nick to CC.

Nick: feel free to make any suggestion about the best UI for this. :)
Comment 7 Felix Kaser 2009-11-12 15:04:26 UTC
My question was more of a "whats best" type :)

I think I will have to experiment a bit what looks best, a Infobar with account name and status and image or just add a new label with the status!

I would like to introduce colors, red for not connected, yellow/orange for connecting and green for connected. it would be nice to color all the accounts in the list as well. From the human factors point thats nice because you see with one look which account is connected and which is not. At the moment the feedback is a gray text or blinking icon in the list...
Comment 8 Guillaume Desmottes 2009-11-12 15:15:36 UTC
Yeah experiement for now, we'll see what looks best.

I agree that we should display the status of all the accounts in the treeview as well but it's out of the scope for this bug. Let's do it in the pane first.
Comment 9 Nick Richards 2009-11-16 11:10:47 UTC
Created attachment 147865 [details]
Wireframe for account state in the settings dialogue

Here's the appropriate wireframe page from the empathy account settings dialogue. As you can see, we intended to put the online state in an infobar all along. ;-)
Comment 10 Guillaume Desmottes 2009-11-16 12:01:34 UTC
I like the idea but I'd prefer to have the status at the top of the widget, not the bottom.
Comment 11 Nick Richards 2009-11-16 12:24:03 UTC
The idea is to follow the principle of keeping reporting of state as close as possible spatially to the control that changes that state. In this case it's the account on/off toggle.
Comment 12 Guillaume Desmottes 2009-11-16 12:46:22 UTC
It depends. If the status is 'offline' then indeed the control to change it is the on/off toggle. But if the account is disconnected because of a miss configuration error, then it's a field in the configuration widget.

Furthermore, we are considering to move the on/off toggle to the bottom of the widget (bug #593268).
Comment 13 Nick Richards 2009-11-16 15:32:13 UTC
Yeah, I've been looking at that - I wouldn't be against that - although I'd love to get some time to look at all of the accounts and redesign that right hand side for all of them.

Otherwise: the location of the info bar depends rather on what information you can get back about the error. The principle that it's important to give the information as close to the source of the problem as possible doesn't change, just the accuracy of your feedback affects the location.
Comment 14 Felix Kaser 2009-11-17 09:03:54 UTC
I made a quick mockup to show how I thought we could do it. http://people.collabora.co.uk/~kaserf/accounts_dialog/accounts-dialog.png

It would be nice to replace the retry button with the spinner if the state of the account is "connecting".

I'm not really happy with the mockup (well my mocking skills suck but thats not the point ;) )... I'm just not seeing where to improve this...
Comment 15 Felix Kaser 2009-11-28 20:03:36 UTC
first screenshots can be found here: http://people.collabora.co.uk/~kaserf/accounts-dialog-status/

it is the naive implementation, no spinner, only a label showing the satus.

in my opinion a spinner is overkill. most of the time the account is either connected or disconnected. the connecting state is the rarest and shortest as well. either the connection can be established or not. showing the spinner in these few seconds is not worth the time...

if you want to try it out, get my branch at: http://git.collabora.co.uk/?p=user/kaserf/empathy.git;a=shortlog;h=refs/heads/accounts-dialog
Comment 16 Guillaume Desmottes 2009-11-30 11:26:33 UTC
I'm not sure about using colored labels. That doesn't seem very GNOMEish to me.
Did you try to add a frame as in Nick's mockup?

I do think it's worth to have a spinner. Connecting can take some time (if you are using a slow 3G connection for example) and that's good way to tell to the user than things are "in progresss".
Comment 17 Felix Kaser 2009-12-01 09:16:14 UTC
But Nick's mockup is not very GNOMEish too... ;)

My next step is to replace the account-name-label, status-label and proto-icon with a gtk-info-bar (with all the things I just "replaced" included). That would look similar to Nick's mockup I guess, but it would put the information about the status above the login name / password / so on and not below...
Comment 18 Nick Richards 2009-12-01 12:53:01 UTC
Felix - yeah, you've rumbled me ;-) although I'd like to think that our style will infiltrate gnome in time.

Above is cool, so long as it's next to it. And a gtk-info-bar is best, that's what we expect to be used for these sorts of things.

The thing with colour, when there's no shape differentiator is that it's completely opaque to colour blind users (which is lest we forget - a lot of people http://www.wrongdiagnosis.com/c/color_blindness/stats.htm ) 

I'd say that the infobar itself would be enough to show that there's something going on there, especially if the state is not shown for connected accounts. It's best only to show information like that to the user when it's the state we don't expect as we're optimistic as an application and assume the user wants to be online.
Comment 19 Felix Kaser 2009-12-01 13:02:21 UTC
I will work out some other screenshots regarding your input :) thx a lot
Comment 20 Felix Kaser 2009-12-02 23:30:46 UTC
new screenshots, new branch:

http://people.collabora.co.uk/~kaserf/accounts-dialog-status/
http://git.collabora.co.uk/?p=user/kaserf/empathy.git;a=shortlog;h=refs/heads/accounts-dialog-infobar

the screenshots with the infobar below the information happened accidentally ;) but I saved a patch if we decide to go for that version. Actually it looks quite good :)

When the account is online the infobar is completely hidden. If the status is disconnected I will show the reason as well, "REASON" is just a quick hack but it does the job for the screenshots.

We could add a icon to the infobar as well, but thats detail!

A thing I was not so sure about: should we display the infobar if the account is disabled? I guess we should and put as a reason "account disabled" or even a completely different message (not "disconnected").
Comment 21 Guillaume Desmottes 2009-12-03 11:12:04 UTC
I looks very nice! I like it.
I'm still not sure which position is best though.

Yeah, we should display the info bar when an account is disabled saying that it is... disabled :)
Comment 22 Felix Kaser 2009-12-08 12:11:05 UTC
the branch is finished and awaits review...

http://git.collabora.co.uk/?p=user/kaserf/empathy.git;a=shortlog;h=refs/heads/accounts-dialog-infobar
Comment 23 Guillaume Desmottes 2009-12-08 13:42:08 UTC
- you should display the status of the icon if it's connected

- if an enabled account is offline because our presence is offline, we should say so instead of "Unknown reason". Also if our presence is offline because there is no network connection, say that.

- I think we should use a different type for "disabled" and "error". Maybe we should use info for "disabled"? Or "error" if the account is disconnected because of an error.

- We shouldn't duplicate the friendly string for TP_CONNECTION_STATUS_REASON_*. Please refactor the code to share it with empathy-main-window.
Comment 24 Felix Kaser 2009-12-08 19:00:56 UTC
I updated the branch, could you give it another look please.

I'm not so sure about the different message strings (I'm not a native english speaker), maybe someone can help me there.
Comment 25 Guillaume Desmottes 2009-12-09 10:07:59 UTC
- When connected I'd use "Status - Status message". It's more coherent and less redudant. For example "Away - At the pub" or just "Away" if there is no custom status message.

- We should use "Disconnected - $reason" when an error happens and "Offline - $reason" when the account is offline because it's not enabled or Empathy is not connected to internet.

+  /* Update the status-infobar in the details view*/
a space is missing before '*/'
Comment 26 Felix Kaser 2009-12-09 23:30:43 UTC
I've updated the branch to suit your changes (and fixed another bug that appeared).

One last time please :)
Comment 27 Guillaume Desmottes 2009-12-10 13:39:32 UTC
I'm fine with your latest changes. I reviewed the whole diff and have some last comments:

accounts_dialog_update_status_infobar:
 gtk_tree_model_get (model, &iter,
      COL_ACCOUNT_POINTER, &selected_account, -1);
This ref the TpAccount you should unref it once you're done with it.

  connectivity = empathy_connectivity_dup_singleton ();
Get if only if you actually need it.

+  /* Update the status-infobar in the details view when disabling*/
missing space


I tried to add an account and got this crash. I can't reproduce it with master so I guess that's a regression from your branch:

tp-glib-CRITICAL **: tp_account_get_connection_status: assertion `TP_IS_ACCOUNT (account)' failed
aborting...

Program received signal SIGABRT, Aborted.
0x00007fffeec844b5 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
	in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) bt
  • #0 *__GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 *__GI_abort
    at abort.c line 92
  • #2 IA__g_logv
    at /build/buildd/glib2.0-2.22.2/glib/gmessages.c line 549
  • #3 IA__g_log
    at /build/buildd/glib2.0-2.22.2/glib/gmessages.c line 569
  • #4 tp_account_get_connection_status
    at account.c line 2216
  • #5 accounts_dialog_update_status_infobar
    at empathy-accounts-dialog.c line 208
  • #6 accounts_dialog_model_selection_changed
    at empathy-accounts-dialog.c line 1016
  • #7 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 767
  • #8 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3247
  • #9 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 2980
  • #10 IA__g_signal_emit
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3037
  • #11 IA__gtk_tree_selection_select_path
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtktreeselection.c line 760
  • #12 IA__gtk_tree_selection_select_iter
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtktreeselection.c line 828
  • #13 accounts_dialog_model_set_selected
    at empathy-accounts-dialog.c line 1228
  • #14 accounts_dialog_button_create_clicked_cb
    at empathy-accounts-dialog.c line 1513
  • #15 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 767
  • #16 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3247
  • #17 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 2980
  • #18 IA__g_signal_emit
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3037
  • #19 gtk_real_button_released
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkbutton.c line 1707
  • #20 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 767
  • #21 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3177
  • #22 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 2980
  • #23 IA__g_signal_emit
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3037
  • #24 gtk_button_button_release
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkbutton.c line 1599
  • #25 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmarshalers.c line 84
  • #26 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 767
  • #27 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3285
  • #28 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 2990
  • #29 IA__g_signal_emit
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3037
  • #30 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c line 4767
  • #31 IA__gtk_propagate_event
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c line 2417
  • #32 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c line 1622
  • #33 gdk_event_dispatch
    at /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkevents-x11.c line 2369
  • #34 g_main_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 1960
  • #35 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2513
  • #36 g_main_context_iterate
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2591
  • #37 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2799
  • #38 IA__gtk_main
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c line 1218
  • #39 main
    at empathy.c line 1051

Comment 28 Felix Kaser 2009-12-14 09:01:25 UTC
I fixed the things you mentioned, but there is still one small problem:

when creating an account the infobar shows always "Offline - Account disabled" (with a fake account which should be network error) until I reselect the account in the treeview. I think this is a problem not directly connected to this bug, because when I create a fake account the error-infobar in the main window does not appear either.

this is reproducible also on master, probably a problem in empathy-account-widget (I guess we have to force a reconnect there, because if MC is running for some time the connection interval is high and only enabling an account does not connect it?!?!)

I forced a push to the server because I rebased it on master:
http://git.collabora.co.uk/?p=user/kaserf/empathy.git;a=shortlog;h=refs/heads/accounts-dialog-infobar
Comment 29 Guillaume Desmottes 2009-12-14 13:22:40 UTC
+  /* do not update the infobar when the account is not selected */
+  if (account != selected_account)
+    {
+      return;
+    }

No need for { } when you early return.

+  if (!creating_account)
+    g_free (status_message);

g_free is NULL-safe, so just init status_message to NULL and you don't need this check.

I think we shouldn't display the infobar when creating a new account until we hit the Login/Save button.
Comment 30 Felix Kaser 2009-12-15 13:25:32 UTC
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.