Commit graph

118 commits

Author SHA1 Message Date
Georges Basile Stavracas Neto
13da84e451 online-accounts: Add margins to the rows' icons
Per Allan's request, add more margin to the rows' icons.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-17 17:23:59 +01:00
Georges Basile Stavracas Neto
1f1f2e2b1f online-accounts: Always keep editor dialog size the minimum
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
2017-02-17 17:19:45 +01:00
Georges Basile Stavracas Neto
6c633621a4 online-accounts: Drop GoaAddAccountDialog
The dialog is not used anymore, and can be safely removed.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-13 16:00:53 +01:00
Georges Basile Stavracas Neto
a6858fff62 online-accounts: Hide remove button when account is locked
https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-13 15:09:26 +01:00
Georges Basile Stavracas Neto
5807bb4cc3 online-accounts: Add separators between listbox rows
https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-13 14:59:14 +01:00
Georges Basile Stavracas Neto
7d852bfab0 online-accounts: Small UI improvement
Add more margin to the lists.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-13 14:56:31 +01:00
Georges Basile Stavracas Neto
14d0988208 online-accounts: Bring back account removal
Following the previous commit, this commit effectively brings
back the account removal feature that was temporarily removed
by 4e197b491f.

This is now reimplemented as an in-app notification, and users
now have the option to undo an accidentally removed account.

Some changes by Debarshi Ray.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-13 14:37:08 +01:00
Georges Basile Stavracas Neto
20216c09f9 online-accounts: Add a remove button to the account dialog
After temporarily removing the ability to delete accounts in
4e197b491f, let's start bringing it back again by adding a Remove
Account button to the account editor dialog, as per the recent mockups.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-08 18:28:00 +01:00
Georges Basile Stavracas Neto
4f1e27e3ba online-accounts: Explicitly remove the dialog's border width
Looks like Gtk+ assumes all dialogs' internal-vbox widgets have a
2px border, so explicitly set it to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-08 17:33:46 +01:00
Georges Basile Stavracas Neto
d50a07da56 online-accounts: Make adding an account inline to the edit dialog
When adding an account, the old proccess was: use the (removed) toolbar
to open the New Account dialog, select a provider in that dialog, add
the account and see the newly created account in the panel itself.

That approach had issues, e.g. the user would have to close the dialog
if she mistakenly selected a provider. After moving the provider list
to the panel itself, it doesn't make sense anymore to have another
provider list inside the dialog.

Fix this by moving the new account view to the accounts dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-08 17:33:46 +01:00
Georges Basile Stavracas Neto
6f60e64075 online-accounts: Fix typo
This was introduced while rebasing
c26f8ae018

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-08 16:26:09 +01:00
Georges Basile Stavracas Neto
76062e1106 online-accounts: Add a stack to the account dialog
This will be used to unify the account creation proccess and the
account editor.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-01-03 18:50:23 +01:00
Georges Basile Stavracas Neto
dce3e168d2 online-accounts: Remove unused widgets
These widgets are not used anymore, and they're not present in the
latest designs.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-01-03 18:36:41 +01:00
Georges Basile Stavracas Neto
c26f8ae018 online-accounts: Add a providers listbox to the panel
This commit starts moving the contents of the add account dialog
class to the panel itself, by adding a providers listbox below
the list of available account as per the new mockups. As a side effect,
this commit temporarily makes removing an account non-functional.

The next commits are focused on finishing this move and removing
the add account dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-01-03 17:52:07 +01:00
Georges Basile Stavracas Neto
7117f63718 online-accounts: Make the entire panel scrollable
The current implementation of the Online Accounts panel allows only
the account list to scroll. To prepare ouselves for the future
changes, let's make the entire panel scrollable.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-01-03 17:03:49 +01:00
Georges Basile Stavracas Neto
d925774a88 online-accounts: Remove unused 'id'
https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-01-03 17:00:52 +01:00
Georges Basile Stavracas Neto
be9687ce94 online-accounts: Simplify setting the margin
https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-01-03 15:03:18 +01:00
Georges Basile Stavracas Neto
8b56b9d1d8 online-accounts: Add a header label as per the latest mockups
https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-01-03 15:00:04 +01:00
Georges Basile Stavracas Neto
4e197b491f online-accounts: Make the main listbox non-selectable
Instead of selecting an account, this commit makes the account
editor dialog only visible through explicit activation of the
account row.

As a side effect, this commit temporarily makes removing an
account non-functional.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-12-15 19:40:28 +01:00
Debarshi Ray
182cac1ea3 online-accounts: Update the UI if IsLocked changes
We want to check the IsLocked property whenever we call
show_page_account. ie. when we show an account for the first time, and
also when the displayed account emits account-changed. Hence it is
better to have them together.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-12-15 19:08:47 +01:00
Georges Basile Stavracas Neto
1a427a8ac3 online-accounts: Use a dialog to manage the online account
Following the mockups, the Online Accounts panel shall use a modal
dialog to edit online accounts.

This commit moves the current widgets to a dialog, and shows this
dialog whenever an account is selected.

Some changes by Debarshi Ray.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-12-15 17:51:59 +01:00
Georges Basile Stavracas Neto
54df308648 online-accounts: Use the ui file to connect to signals
Simplify the code by using the GtkBuilder file to connect to the
signals instead of manually doing it in the code.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-11-30 17:23:10 +01:00
Georges Basile Stavracas Neto
bdde40ac15 online-accounts: Use a listbox instead of a treeview
As part of the port to the redesigned Online Accounts panel,
the main widget to be displayed is a GtkListBox, so we can have
finer control of the UI elements and eventually be able to put
real widgets instead of using cell renderers.

This commit, then, makes the Online Account panel use a listbox
widget in the sidebar. The behavior of the panel was not changed.

Since its using a listbox now, we can drop the custom GoaPanelAccountsModel
class.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-11-30 17:16:35 +01:00
Georges Basile Stavracas Neto
902ab4e448 online-accounts: Turn into a template class
https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-11-30 17:16:35 +01:00
Georges Basile Stavracas Neto
e5208a397a online-accounts: Remove unnecessary code
Calling gtk_style_context_set_junction_sides makes no visual
difference. We are using stock GTK+ containers, which should already
be taking care of this.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-11-30 17:16:35 +01:00
Georges Basile Stavracas Neto
013b2d865b online-accounts: Use G_DECLARE_FINAL_TYPE
https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-11-30 17:16:35 +01:00
Georges Basile Stavracas Neto
a9701b3024 online-accounts: Fix the namespace prefix
The module-wide prefix is 'Cc' and the name of the class is 'GoaPanel',
not 'CcGoa' and 'Panel'.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2016-11-30 17:16:35 +01:00
Debarshi Ray
2cb0f5e3a3 online-accounts: Let goa_provider_show_account create the full UI
It is not ideal to have the UI split across a semi-stable,
cross-module interface boundary. Non-trivial changes to the UI require
changes to the goa_provider_show_account interface. In fact, we were
already not using it the way it was originally intended to be.
Moreover, it prevents us from having a sufficiently different UI for
certain account types.

Instead, let's just pass a vertical GtkBox to the GoaProvider and let
it fill it up whichever way it wants to.

Bump required GOA version for the new goa_provider_show_account
behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=769213
2016-08-14 12:18:52 +02:00
Georges Basile Stavracas Neto
2777fd583d panels: use the new categories
Following the previous patch, this patch adds the new alternative
categories to the panels' Desktop files. These alternative categories
are only relevant for the alternative Shell, and do not break the
current Shell in any way.

https://bugzilla.gnome.org/show_bug.cgi?id=767301
2016-06-14 12:16:43 -03:00
Debarshi Ray
9067983174 online-accounts: Add a Calendar group
This will be useful when we add a CalDAV provider.

https://bugzilla.gnome.org/show_bug.cgi?id=767401
2016-06-09 15:53:25 +02:00
Debarshi Ray
0129d8a6ae online-accounts: Don't use deprecated GoaProviderGroup API
https://bugzilla.gnome.org/show_bug.cgi?id=767401
2016-06-09 15:53:25 +02:00
Bastien Nocera
5c10ce45b8 panels: Fix translators comments being truncated
Commit b3be076 added soft hyphens along with a comment for translators
to use those soft hyphens. Except that gettext would only grab the one
line out of the four we wrote for translators to read. Put them all on
the same line so that gettext actually extracts those.

https://bugzilla.gnome.org/show_bug.cgi?id=765778
2016-04-28 23:38:00 +02:00
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Debarshi Ray
cc144a0707 online-accounts: Fix the add account dialog's size with newer GTK+
We should be pairing gtk_window_get_size with
gtk_window_set_default_size to avoid inconsistencies between the size
reading and setting code. eg., in recent GTK+ versions,
gtk_window_get_size and gtk_widget_set_size_request differ in their
interpretation of the CSD chrome.

However, gtk_window_set_default_size didn't work with non-resizable
GtkWindows, until now.

https://bugzilla.gnome.org/show_bug.cgi?id=762548
2016-03-09 13:47:27 +01:00
Christophe Fergeau
d289aa84e7 online-accounts: Remove unused private member
This fixes this leak:

==21491== 384 (40 direct, 344 indirect) bytes in 1 blocks are definitely lost in loss record 18,518 of 19,643
==21491==    at 0x8792D3A: g_type_create_instance (gtype.c:1848)
==21491==    by 0x8779AC5: g_object_new_internal (gobject.c:1774)
==21491==    by 0x8779FD4: g_object_newv (gobject.c:1921)
==21491==    by 0x8779676: g_object_new (gobject.c:1614)
==21491==    by 0x747DFFC: gtk_list_store_new (gtkliststore.c:424)
==21491==    by 0x49C781: goa_panel_add_account_dialog_init (cc-online-accounts-add-account-dialog.c:300)
==21491==    by 0x8792E7D: g_type_create_instance (gtype.c:1870)
==21491==    by 0x8779AC5: g_object_new_internal (gobject.c:1774)
==21491==    by 0x877A71A: g_object_new_valist (gobject.c:2033)
==21491==    by 0x87796C5: g_object_new (gobject.c:1617)
==21491==    by 0x49CC26: goa_panel_add_account_dialog_new (cc-online-accounts-add-account-dialog.c:380)
==21491==    by 0x49B162: get_all_providers_cb (cc-online-accounts-panel.c:701)
==21491==    by 0x8426107: g_simple_async_result_complete (gsimpleasyncresult.c:801)
==21491==    by 0x8426153: complete_in_idle_cb (gsimpleasyncresult.c:813)
==21491==    by 0x8A0C470: g_idle_dispatch (gmain.c:5397)
==21491==    by 0x8A09AB8: g_main_dispatch (gmain.c:3122)
==21491==    by 0x8A0A8FC: g_main_context_dispatch (gmain.c:3737)
==21491==    by 0x8A0AAE0: g_main_context_iterate (gmain.c:3808)
==21491==    by 0x8A0ABA4: g_main_context_iteration (gmain.c:3869)
==21491==    by 0x846EE55: g_application_run (gapplication.c:2311)
==21491==    by 0x44CA4B: main (main.c:57)

https://bugzilla.gnome.org/show_bug.cgi?id=756762
2015-10-19 11:19:17 +02:00
Christophe Fergeau
c84722248e shell: Revert "Let panels have their own commandline flags"
This reverts commit 31a8a99440.

This was meant for bgo#695885 which has stalled for a while, so this
feature has no in-tree user. This commit removes it for now, this can be
readded when users for it materialize.

https://bugzilla.gnome.org/show_bug.cgi?id=751597
2015-07-16 11:49:34 +02:00
Debarshi Ray
d45f093fbf online-accounts: Widen the accounts list
https://bugzilla.gnome.org/show_bug.cgi?id=746538
2015-04-13 15:05:40 +02:00
Bastien Nocera
cff4336032 online-accounts: Prevent the attention-needed icon from getting hidden
By making sure that the label inside each of the list items gets
only whatever space is left by the left and right-side icons.

https://bugzilla.gnome.org/show_bug.cgi?id=746538
2015-04-13 15:05:40 +02:00
Debarshi Ray
b24bfa8197 online-accounts: Disable the remove button for locked accounts
Bump required GOA version for the IsLocked property.

https://bugzilla.gnome.org/show_bug.cgi?id=737665
2015-04-13 14:19:59 +02:00
Debarshi Ray
7509af9d22 online-accounts: Don't scroll single entry lists
Create the scrolled window with vertical scrolling turned off. Turn it
on when there are more than one items in the list.

Note that the immediate parent of the list is a GtkViewport, so we
need to explicitly look for the GtkScrolledWindow.

https://bugzilla.gnome.org/show_bug.cgi?id=745584
2015-03-22 07:59:46 +01:00
Rui Matos
54227dc21e online-accounts: Fix deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
Arnaud Bonatti
eb6a9c656a online-accounts: Increase the height of the panel
https://bugzilla.gnome.org/show_bug.cgi?id=732636
2014-07-22 11:58:33 +02:00
Christophe Fergeau
46b7358069 online-accounts: Use AM_CPPFLAGS rather than INCLUDES
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')

https://bugzilla.gnome.org/show_bug.cgi?id=732189
2014-06-25 12:32:29 +02:00
Bastien Nocera
87863ad3f0 online-accounts: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
2014-06-24 11:35:31 +02:00
Debarshi Ray
29bd627bb3 online-accounts: Use a header bar for the "Add Account" dialog
Even though this is an action dialog, and not a presentation dialog,
as defined in the HIG [1], there is no need for action buttons when
showing the initial list because the list is single-click.

[1] https://wiki.gnome.org/Design/HIG/Dialogs

https://bugzilla.gnome.org/show_bug.cgi?id=730080
2014-05-21 18:07:11 +02:00
Volker Sobek
f4dcf9984e online-accounts: Set max width in chars for label
Set a limit of 40 chars to the label explaining the panel when no
accounts have been added yet. This prevents the label from expanding
itself and the whole window arbitrarily.

https://bugzilla.gnome.org/show_bug.cgi?id=720188
2014-03-03 10:51:11 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Bastien Nocera
a3c2f75f33 online-accounts: Mention Pocket in the keywords
https://bugzilla.gnome.org/show_bug.cgi?id=704564
2014-01-13 17:34:15 +01:00
Yosef Or Boczko
6e8a7e942f online-accounts: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:30:42 +02:00
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05:00