When the user has no account set, the current implementation of the
Online Accounts panel shows a weird 1px line that is the empty list.
Fix that by only showing the list when there are accounts available.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
We have different variants of the same code that iterates over all the
rows in a GtkListBox to find the one that corresponds to a given
account. Some action is then performed on the row, depending on the use
case at hand. In future we might want to look at the other rows in the
list to decide whether to hide the entire GtkFrame or not.
Let's consolidate this to reduce some duplication.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
This will make the subsequent commits easier to read.
We are going to change get_row_for_account to be more generic. Moving
this code higher up will let us use it from a few more call sites.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
The current implementation of the Online Accounts panel allows
2 states: either the widgets of the panel fill the whole horizontal
space, or they shrink and fill only the absolutely minimum. The
ideal solution, however, is to make them grow with the panel.
Fix that by turn the main box into a GtkGrid, and adding stub widgets
that expand horizontally and pull the main widgets to the middle,
allowing them to cover at most 1/3 of the screen. The widgets themselves
are inside a GtkBox, so that hiding them automatically removes the
spacing in between.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
When offline, we currently block the new accounts listbox
so that users can't add new accounts. There is, however,
no visual indication that we're offline, besides the listbox.
Fix that by adding a descriptive label that's only visible
when offline.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
pp_printer_rename_async is better than the old printer_rename
utility.
The PpDetailsDialog doesn't need to do anything in the callback
since we are emiting the "printer-changed" signal when the dialog
is closed.
https://bugzilla.gnome.org/show_bug.cgi?id=769114
Since we are already applying the changing in the PpDetailsDialog
when it gets closed, there's no need to apply these changes in
the focus-out-event of its respective GtkEntries.
https://bugzilla.gnome.org/show_bug.cgi?id=769114
When adding and editing accounts, the different options that Online
Accounts provides may require different sizes of the dialog. There is,
however, a specific issue where the dialog can't resize because a
provider widget is interefering with the others.
Fix that by making the dialog's stack non-homogeneous, and making sure
to always reset the dialog size before showing it.
https://bugzilla.gnome.org/show_bug.cgi?id=774222
Wrong variables are used to store timeout id, consequently, the sources
are not properly removed in all cases. Then the dialog may crash in certain
cases if it is closed before the source functions are called.
https://bugzilla.gnome.org/show_bug.cgi?id=778595