Commit graph

4605 commits

Author SHA1 Message Date
Felipe Borges
2ad93bc0b2 printers: Properly free pp_jobs_dialog
Since now we have proper async implementation for getting jobs, we
do not need to increment/decrement the objects ref_count manually.

https://bugzilla.gnome.org/show_bug.cgi?id=779313
2017-03-06 16:06:24 +01:00
Felipe Borges
c40772a862 printers: Port PpJobsDialog to pp_printer_get_jobs_async
https://bugzilla.gnome.org/show_bug.cgi?id=779313
2017-03-06 16:05:29 +01:00
Felipe Borges
1d0ae49685 printers: Introduce pp_printer_get_jobs_async ()
It is a PpPrinter method to query asychronously for printing jobs
information.

It should replace cups_get_jobs_async ()

https://bugzilla.gnome.org/show_bug.cgi?id=779313
2017-03-06 16:05:29 +01:00
Matthias Clasen
8b9be45cba notifications: Forward notification settings to portal
The flatpak notification portal reads permissions out
of the permission store, so forward the notification
permissions there in order to prevent sandboxed
applications from sending notifications.

The difference is a bit cosmetic, since the shell would
not show the notification anyway in this case, but it
is nicer to just cut off the calls and not let them
through the portal in the first place.

https://bugzilla.gnome.org/show_bug.cgi?id=778851
2017-03-02 16:40:33 -05:00
Bastien Nocera
cf5c17b692 mouse: Add debug output for touchpad disable switch
See https://bugzilla.gnome.org/show_bug.cgi?id=779290
2017-03-01 13:00:33 +01:00
Georges Basile Stavracas Neto
726dcfee91 printers: Allow printer model label to ellipsize
In the Printers panel, the model label of a given printer
may be a long string, specially when it's composed of the
versioning and specifics of the printer.

Because the model label doesn't ellipsize, we may have very
long labels, making the entire Control Center very wide and
unresizeable.

Fix that by making the model label ellipsize.

https://bugzilla.gnome.org/show_bug.cgi?id=779376
2017-02-28 18:57:31 +01:00
Felipe Borges
5dd8e58585 printers: Free the PpJobsDialog after closing it
Now we can safely pp_jobs_dialog_free () the PpJobsDialog.

https://bugzilla.gnome.org/show_bug.cgi?id=779079
2017-02-27 16:52:17 +01:00
Felipe Borges
fe51a743c3 printers: Count only current users job
Instead of querying for all the jobs, query just for jobs belonging
to the current user.

https://bugzilla.gnome.org/show_bug.cgi?id=779079
2017-02-27 16:29:44 +01:00
Felipe Borges
89ff6a610e printers: Store PpPrinterEntry instances for individual manipulation
We were actualizing the whole printers collection everytime
something should change.

These patch introduces a HashTable keyed by the unique printer.name,
which allows us to access individual instances of PpPrinterEntry.

https://bugzilla.gnome.org/show_bug.cgi?id=779079
2017-02-27 16:29:43 +01:00
Felipe Borges
5302047ff1 printers: Subscribe to jobs notifications
The previous implementation of the panel was unable to individually
update a PpPrinterEntry jobs count and its PpJobsDialog.

These changes make the job notifications trigger updates in the
PpPrinterEntry UIs, keeping track of job events on the go.

https://bugzilla.gnome.org/show_bug.cgi?id=779079
2017-02-27 16:29:43 +01:00
Felipe Borges
86c028ff9b printers: Fill the supply_frame background when supply is empty
According to the mockups at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines
The supply level bar should have a grey background when there are
no colors in the supply bar.

This patch sets the "background" css name to the supply_frame when
there's not a single color in the supply bar.

https://bugzilla.gnome.org/show_bug.cgi?id=779075
2017-02-26 12:52:29 +01:00
Felipe Borges
2c7fc8653d printers: Tweak the printer supply level bar
Make the supply level bar size, margin, border, background, and
saturation match the mockups at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

Even though we would obtain primary colors by querying the printer
supply info, it is more eye-candy to desaturate (tone down) the
colors in the UI.

https://bugzilla.gnome.org/show_bug.cgi?id=779075
2017-02-26 12:52:29 +01:00
Felipe Borges
1de145a10b printers: Ellipsize the "location" in the printer entry
Long location names were causing the whole dialog to expand
horizontally.

This patch ellipsizes the "location" string just like the
other fields of a printer entry.

https://bugzilla.gnome.org/show_bug.cgi?id=779071
2017-02-26 12:50:03 +01:00
Felipe Borges
4cfb211761 printers: Ellipsize the "Details Dialog" title
Printers with long names were causing the "Printer Details Dialog"
to expande horizontally.

This patch ellipsizes the custom title of the dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=779071
2017-02-26 12:49:43 +01:00
Felipe Borges
50c2af0cfb user-accounts: Avoid markup in "Your Account" label
The label indicating which photo in the Carousel belongs to the
current user had the <small> markup within the translatable string,
causing unnecessary work for translators. See
https://wiki.gnome.org/TranslationProject/DevGuidelines/Avoid%20markup%20wherever%20possible

This patch formats the string with g_strdup_printf, leaving the
markup tags out of the translatable message.
2017-02-24 17:12:10 +01:00
Piotr Drąg
55b31ba967 online-accounts: Fix grammar in a new string
Since there weren’t any translation updates yet, fix grammar
in the newly added string — “setup” is a noun, “set up” is the verb.
2017-02-23 05:36:09 +01:00
Georges Basile Stavracas Neto
bd527d44c1 online-accounts: Improve dialog content margins
More alignment issues.
2017-02-22 23:13:00 -03:00
Allan Day
2e6d07cb01 online-accounts: Fix account dialog layout
More spacing needed everywhere. This is a partial fix - some other
adjustments are necessary.
2017-02-22 23:12:57 -03:00
Allan Day
432d55b30e online-accounts: Improve panel layout
Ensure sufficient spacing within and around rows. Increase panel
height to make it easier to view the list.
2017-02-22 23:12:52 -03:00
Georges Basile Stavracas Neto
4662c5be58 online-accounts: Make the account editor box vertical
When credentials expire, they're being added horizontally since
this is the default value of the GtkOrientable:orientation property.

Fix that by making the account editor box vertical, and adding some
spacing.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-22 23:00:49 -03:00
Georges Basile Stavracas Neto
fa81d1679a online-accounts: Only show the accounts list when there are accounts
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
2017-02-22 23:00:49 -03:00
Debarshi Ray
af7c214aaf online-accounts: Consolidate the row modification code a bit
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
2017-02-22 23:00:49 -03:00
Debarshi Ray
25f97f15ce online-accounts: Shuffle some code around
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
2017-02-22 23:00:49 -03:00
Georges Basile Stavracas Neto
1594d8c7a1 online-accounts: Align the panel widgets in the middle
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
2017-02-22 23:00:49 -03:00
Georges Basile Stavracas Neto
1e580c679b online-accounts: Add an offline message label
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
2017-02-22 23:00:49 -03:00
Georges Basile Stavracas Neto
e9198bdb4d online-accounts: Add a bottom row to display non-branded providers
As per the mockups, and mimicking the dialog behavior, add a bottom
row that shows non-branded providers.

https://bugzilla.gnome.org/show_bug.cgi?id=774222
2017-02-22 23:00:49 -03:00
Felipe Borges
ca30e0ead9 printers: Use async rename method
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
2017-02-22 17:05:50 +01:00
Felipe Borges
5fa1dede21 printers: Do not apply rename/location changes in focus-out-event
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
2017-02-22 17:05:50 +01:00
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
Richard Hughes
9725efd3e4 display: Tweak night light dialog UI to match latest mockups 2017-02-16 19:56:51 +00:00
Ondrej Holy
60c315b53b user-accounts: Fix crash when name is changed and dialogue closed
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
2017-02-16 09:21:42 +01:00
Felipe Borges
6bfc60b779 printers: Make the printer address always sensitive
This patch individually updates the sensitivity of the
PpDetailsDialog child widgets, so we can leave the printer
address label always sensitive.

https://bugzilla.gnome.org/show_bug.cgi?id=778682
2017-02-15 15:56:32 +01:00
Jeremy Bicha
86f131a1cb display: Really fix typo in "Tomorrow"
Spelled correctly in the commit message, but not in the code itself.
Yay! :(

https://bugzilla.gnome.org/show_bug.cgi?id=778513
2017-02-15 11:58:54 +01:00
Jeremy Bicha
22daedad49 privacy: Set destructive-action for confirmation buttons only
https://bugzilla.gnome.org/show_bug.cgi?id=778567
2017-02-15 11:48:26 +01:00
Jeremy Bicha
5bbb097035 privacy: Use "destructive-action" style for delete buttons
https://bugzilla.gnome.org/show_bug.cgi?id=778567
2017-02-14 19:11:34 +01:00
Jeremy Bicha
02e556cfb3 privacy: Use ellipses for btns that require confirmation
https://bugzilla.gnome.org/show_bug.cgi?id=778568
2017-02-14 19:09:33 +01:00
Jeremy Bicha
479f04904c printers: Use ellipsis for "Add a Printer"
https://bugzilla.gnome.org/show_bug.cgi?id=778568
2017-02-14 19:09:33 +01:00
Jeremy Bicha
681f40ca09 keyboard: Use ellipsis for "Reset All"
https://bugzilla.gnome.org/show_bug.cgi?id=778568
2017-02-14 19:09:33 +01:00
Ondrej Holy
9440035560 user-accounts: Don't modify pre-filled username
If user type custom username, don't modify it automatically when
changing fullname.

https://bugzilla.gnome.org/show_bug.cgi?id=778555
2017-02-14 18:44:52 +01:00
Richard Hughes
2f1af82a4e display: Only show the sunset/sunrise icons when not manually specified 2017-02-14 11:20:08 +00:00
Jeremy Bicha
206310e9fb user-accounts: Use ellipsis for "Remove User"
https://bugzilla.gnome.org/show_bug.cgi?id=778568
2017-02-13 19:56:07 +01:00
Felipe Borges
ae17ba1f47 printers: Set min-content-height on the scrolled window
Set a minimum content height of 490px for the panel when the
allocated height is smaller than 490px.

490 is an estimated value for the panels to properly fit on netbook
screens. See https://wiki.gnome.org/Design/SystemSettings#Notes

https://bugzilla.gnome.org/show_bug.cgi?id=767600
2017-02-13 19:45:35 +01:00
Felipe Borges
378e04125d printers: Make the printers panel a single column
This patch purges all the former TreeView machinery and makes the
Printers panel have the printers listed in a scrolled window, as
designed at https://wiki.gnome.org/Design/SystemSettings/Printers

https://bugzilla.gnome.org/show_bug.cgi?id=767600
2017-02-13 19:45:35 +01:00
Felipe Borges
7e3d89e13a printers: Introduce PpDetailsDialog
This dialog handles the editing of printer properties such as
name, location, automatic discovery of driver, manual selection
of printer driver, and manual selection of ppd file.

https://bugzilla.gnome.org/show_bug.cgi?id=767600
2017-02-13 19:40:09 +01:00
Felipe Borges
37e37961e5 printers: introduce PpPrinterEntry widget
This commit introduces the following regressions:
- no possibility of renaming properties such as printer names,
location, or changing model/driver. This issue is going to be
solved nextly by the introduction of the PpDetailsDialog.

https://bugzilla.gnome.org/show_bug.cgi?id=767600
2017-02-13 19:27:49 +01:00
Felipe Borges
51a184b1b7 user-accounts: Align the elements of "Add User" dialog
https://bugzilla.gnome.org/show_bug.cgi?id=778457
2017-02-13 19:15:05 +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