Commit graph

373 commits

Author SHA1 Message Date
Felipe Borges
f3141e430b printers: Drop "select_new_printer" property leftover
The select_new_printer property used to be an indicator whether
the view should change to present the newly added printer.

With the Printers presented as a list in the new design, there's
no need for this flag.

https://bugzilla.gnome.org/show_bug.cgi?id=779506
2017-05-29 17:34:55 +02:00
Piotr Drąg
21d697cbe5 printers: Use Unicode quotation marks in a translatable string
See https://developer.gnome.org/hig/stable/typography.html

https://bugzilla.gnome.org/show_bug.cgi?id=772199
2017-05-26 16:10:47 +02:00
Felipe Borges
e5624f90bf printers: Add 10s timeout for printer removal
Dismisses the Printer removal notification after 10 seconds,
removing the printer permanently.

The 10 seconds value is taken from the online-accounts panel.

https://bugzilla.gnome.org/show_bug.cgi?id=693187
2017-05-26 13:16:39 +02:00
Felipe Borges
f065f5005f printers: Allow undoing deletion of a printer
Instead of directly applying the deletion of a printer, we should
follow the GNOME in-app notification deletion guidelines.

This patch introduces the in-app notification following the HIG[0]
for the deletion of a printer. It allows to "undo" the deletion.

The default behavior for these notification is to dismiss a previous
notification. In doing so, when deleting multiple printers, the
"Undo" button only restores the last deleted one. We don't do batch/
bulk removal in the printers panel.

[0] https://developer.gnome.org/hig/stable/in-app-notifications.html.en

https://bugzilla.gnome.org/show_bug.cgi?id=693187
2017-05-26 13:16:39 +02:00
Felipe Borges
5aca01cd65 printers: Remove printers asynchronously
Introduce pp_printer_delete_async ()

https://bugzilla.gnome.org/show_bug.cgi?id=693187
2017-05-26 13:16:36 +02:00
Felipe Borges
870b4e7190 printers: Filter the printer-location in the search
Show printer search results where the searched string matches
the printer-location.

https://bugzilla.gnome.org/show_bug.cgi?id=779656
2017-05-10 11:04:29 +02:00
Felipe Borges
34aedbe992 printers: Add search capabilities to the panel
Due to the recent changes towards the new design, it became slightly
harder to find a printer given a long list of entries.

This patch introduces search capabilities to the panel, filtering
based on the printer name.

https://bugzilla.gnome.org/show_bug.cgi?id=779656
2017-05-09 15:52:12 +02:00
Felipe Borges
e26756d7e3 printers: Make printers-list a GtkListBox
By making the printers list a GtkListBox instead of a GtkBox, we
can use listbox's capabilities for sorting and filter.

https://bugzilla.gnome.org/show_bug.cgi?id=779656
2017-05-09 15:47:04 +02:00
Felipe Borges
519e19f974 printers: Make actualize_printers_list cancellable
This way we can safely interrupt an update without crashing
g-c-c.

https://bugzilla.gnome.org/show_bug.cgi?id=780299
2017-03-28 18:04:56 +02:00
Mario Sanchez Prada
b742936970 printers: Expose the newly added 'Clean' maintenance command to users
Add an extra button "Clean Print Heads" that will be shown when the relevant
maintenance command is available for a printer, to bring this feature back.

Additionally, this commit adds a 'parameters' attribute to PpMaintenanceCommand,
which is needed as the "Clean" command requires to at least be passed "all" as
its single parameter: https://www.cups.org/doc/spec-command.html#Clean

https://bugzilla.gnome.org/show_bug.cgi?id=764620
2017-03-23 13:30:22 +00:00
Felipe Borges
909eb2ac31 printers: Make the dialogs independent of the PpPrinterEntry lifetime
https://bugzilla.gnome.org/show_bug.cgi?id=779846
2017-03-13 09:20:23 +01:00
Allan Day
aa2b98b0ea printers: improve panel layout
Increase spacing in various places and reduce the icon size. This
makes spacing more even and makes the rows feels more open.

https://bugzilla.gnome.org/show_bug.cgi?id=779700
2017-03-10 16:22:08 +01:00
Felipe Borges
1df4da54fc printers: Drop cups_get_jobs_async
pp_printer_get_jobs_async does the job with more modern GLib API
(GTask).

https://bugzilla.gnome.org/show_bug.cgi?id=779313
2017-03-06 16:07:07 +01:00
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
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
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
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
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
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
Piotr Drąg
555e230508 Remove no longer necessary contexts from translatable strings
These strings changed recently and now their contexts don't disambiguate
anything.
2017-02-12 16:02:22 +01:00
Bastien Nocera
8a7d987ab0 build: libsmbclient is not optional
As the printers panel is not optional either.
2017-02-08 19:36:57 +01:00
Bastien Nocera
3f0510cac8 build: Better libm checks
Use AC_CHECK_LIBM instead of AC_CHECK_LIB(m,...
and use $(LIBM) instead of hardcoding "-lm" in Makefiles.
2017-02-08 19:21:53 +01:00
Felipe Borges
fc073f2185 printers: Authenticate samba server also on double-click
The "Add Printer" dialog should be smart enough to know whether
an item listed in the dialog is a samba server or just a printer.
If it is a samba server, it should go for the authentication page
instead of emitting a GTK_RESPONSE_*.

https://bugzilla.gnome.org/show_bug.cgi?id=778277
2017-02-07 13:14:40 +01:00
Felipe Borges
1504a4d576 printers: Resize the "Add Printer" dialog
In order to keep the dialog size in the same aspect ratio of the
mockups as https://wiki.gnome.org/Design/SystemSettings/Printers

The "height-request" property should never go higher 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=778266
2017-02-07 12:55:46 +01:00
Felipe Borges
cc738c8223 printers: Update "Add Printer" button to just "Add"
The mockups at https://wiki.gnome.org/Design/SystemSettings/Printers
show just the word "Add" for the button which opens the "Add Printer"
dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=778268
2017-02-07 12:16:18 +01:00
Felipe Borges
6f3ed9087d printers: Allow dismissing authentication in "Add New Printer" dialog
Introduce a "go-back" button allowing to get back to the list of
printers when the user is exposed to the authentication form in
the "Add New Printer" dialog.

This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2017-02-01 17:53:40 +01:00
Piotr Drąg
9e14dd2c6f Add context to "Add Printer" to disambiguate the string
Many languages may need to translate a button differently than
a window title.
2017-01-18 15:42:41 +01:00
Felipe Borges
bd10fb5284 printers: Drop PpAuthenticationDialog
This dialog is no longer necessary since the authentication form
is now handled in the PpNewPrinterDialog itself.

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2017-01-18 15:21:38 +01:00
Felipe Borges
e8cdaea332 printers: Decouple PpSamba and the PpNewPrinterDialog
PpSamba no longer needs to hold a reference to the dialog window.

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2017-01-18 15:21:38 +01:00
Felipe Borges
ebe21b68ab printers: Use "hostname" in the "Add Printer" dialog
https://bugzilla.gnome.org/show_bug.cgi?id=760783
2017-01-18 15:21:38 +01:00
Felipe Borges
afac6d5340 printers: Merge authentication dialog into "Add Printer"
This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2017-01-18 10:20:20 +01:00
Felipe Borges
66c7f45307 printers: List new printers ASAP in the "Add Printer" dialog
List a printer in the "Add Printer" dialog as soon as it is
discovered. The header subtitle "Searching for Printers"
denotes that the Search is not done yet.

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-12-02 15:10:56 +01:00
Felipe Borges
e980b192d8 printers: Make PpSamba a derivated class of PpHost
https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-11-16 15:53:42 +01:00
Felipe Borges
af9fd3e995 printers: Introduce the "authentication-required" signal in PpHost
This signal should be emitted by hosts and derivated classes when
it is required to authenticate hosts (ask for credentials).

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-11-15 18:54:28 +01:00
Felipe Borges
116f763831 printers: Redesign loading page in the "Add Printer" dialog
This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

The spinner is displayed while search is taking place AND nothing
has been found. Ongoing search is indicated by the sub-heading.

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-10-11 16:55:11 +02:00
Felipe Borges
9eedd9fce8 printers: Update "No Printers Found" page in "Add Printers" dialog
This is a redesign based on the newest mockups available at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines

https://bugzilla.gnome.org/show_bug.cgi?id=760783
2016-10-11 16:54:45 +02:00