Commit graph

497 commits

Author SHA1 Message Date
Felipe Borges
9f9c63fe8d printers: cancel cups subscriptions asynchronously
https://bugzilla.gnome.org/show_bug.cgi?id=748336
2016-03-02 17:16:15 +01:00
Felipe Borges
1d365545cf printers: set current page async
https://bugzilla.gnome.org/show_bug.cgi?id=748336
2016-02-25 16:14:53 +01:00
Felipe Borges
0a7cfa47fb printers: do async connection test during launch of panel
https://bugzilla.gnome.org/show_bug.cgi?id=748336
2016-02-25 16:14:37 +01:00
Felipe Borges
9dd58c0f77 printers: make sure the printer job state_string is initialized
https://bugzilla.gnome.org/show_bug.cgi?id=762630
2016-02-25 13:56:37 +01:00
Felipe Borges
73b07a0b52 printers: use pp_cups_get_dests_async on printers panel
Instead of using the synchronous/blocking cupsGetDests function.

https://bugzilla.gnome.org/show_bug.cgi?id=748336
2016-02-19 15:53:02 +01:00
Felipe Borges
23881eaeac printers: have a "view" style for the Jobs dialog empty state
To match the mockups at
https://wiki.gnome.org/Design/SystemSettings/Printers#Guidelines
2016-01-21 15:15:33 +01:00
Felipe Borges
8baaa81a39 printers: redesign the Printer Jobs Dialog
Update the Printer Jobs Dialog to match the current designs at
https://wiki.gnome.org/Design/SystemSettings/Printers

https://bugzilla.gnome.org/show_bug.cgi?id=755626
2016-01-21 15:08:05 +01:00
Jiro Matsuzawa
5b189ea0e3 printers: Give mnemonic to labelled widgets
https://bugzilla.gnome.org/show_bug.cgi?id=736606
2016-01-18 15:50:20 +01:00
Felipe Borges
7cd6800da0 printers: port pp_cups_get_dests* to GTask
As of GLib 2.46, GSimpleAsyncResult is deprecated
in favor of GTask, which provides a simpler API.

https://bugzilla.gnome.org/show_bug.cgi?id=760581
2016-01-15 11:49:53 +01:00
Felipe Borges
e9413b4b6a printers: polish empty state
If you don't have any printers, the panel used to look rather bare.
There was also a "No printers available" label, which was confusing,
and the insensitive list might be hard to understand.

https://bugzilla.gnome.org/show_bug.cgi?id=690351
2015-10-22 16:40:19 +02:00
Michael Catanzaro
22cb7ccedb printers: Avoid warning about unparented ppd selection dialog
Just need to call gtk_window_set_transient_for() a bit earlier.

https://bugzilla.gnome.org/show_bug.cgi?id=755713
2015-10-07 21:37:43 -05:00
Felipe Borges
ac6b1acc1f printers: avoid crashes when searching for printers w/ special chars
Since the dialog considers just  the hostname part from the URL,
unespacing the url avoids a backend crash.

https://bugzilla.gnome.org/show_bug.cgi?id=754248
2015-09-14 17:47:15 +02:00
Marek Kasik
a1134fdf51 printers: Fix canonicalization test
Function canonicalize_device_name() has been changed recently,
it takes a GList of strings as its first parameter now.

https://bugzilla.gnome.org/show_bug.cgi?id=753733
2015-08-18 11:33:45 +02:00
Marek Kasik
cb07ee03a0 printers: Use GtkListStore for device list
Remove the GList holding printing devices and use already present
GtkListStore for this in the New printer dialog.

This avoids us to install wrong printer when there is more devices
with the same name since we have GtkTreeIter of the selected row.

Use GtkTreeModelFilter for filtering of current devices.

Update test for canonicalize_device_name() since I had to change one
of its parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=749830
2015-08-03 16:56:41 +02:00
Marek Kasik
60bf057bab printers: Merge device-class and is-network-device properties
'device-class' property of PpPrintDevice can contain "network"
or "direct" values. This information can be stored in already
present property 'is-network-device' as well.

https://bugzilla.gnome.org/show_bug.cgi?id=749830
2015-07-30 16:28:09 +02:00
Marek Kasik
7b21b22eef printers: Make PpPrintDevice a regular class
Create class PpPrintDevice with properties taken
from the original PpPrintDevice structure.

https://bugzilla.gnome.org/show_bug.cgi?id=749830
2015-07-30 16:28:06 +02:00
Marek Kasik
48ef91a0b9 printers: Fix compile-time warning
pp-new-printer-dialog.c:673:18: warning: 'device' may be used uninitialized
in this function [-Wmaybe-uninitialized]
2015-07-29 15:48:08 +02:00
Marek Kasik
68e92988a8 printers: Cache pointer to devices-treeview
Store device-treeview in PpNewPrinterDialogPrivate so we
don't need to search for it each time we need it.

https://bugzilla.gnome.org/show_bug.cgi?id=749830
2015-07-27 16:28:39 +02:00
Marek Kasik
c26553ed3e printers: Use macro for getting widgets from builder
Use macro for getting widgets from builder in the New printer dialog.

https://bugzilla.gnome.org/show_bug.cgi?id=749830
2015-07-27 16:28:36 +02:00
Martin Hatina
000dae6e98 printers: Replace deprecated widgets
Replace some deprecated widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=723378
2015-07-26 23:49:39 +02:00
Marek Kasik
880cc01550 printers: Don't show the same device multiple times
Pass all discovered devices to 'GroupPhysicalDevices' instead of just
the devices already present in the list and the newly discovered ones.
Replace an existing device in the list if there is a better device
(e.g. replace 'usb:' by 'hp:' device).

https://bugzilla.gnome.org/show_bug.cgi?id=693186
2015-07-13 12:07:59 +02:00
Marek Kasik
b02f7722dd printers: Check whether we have a device name
Check whether we've been able to find a usable name of given device
to avoid dereference of NULL in canonicalize_device_name().

https://bugzilla.gnome.org/show_bug.cgi?id=749896
2015-07-13 11:21:53 +02:00
Marek Kasik
ed50357f82 printers: Show border around 'No printers detected' text
The GtkStack page which shows the label 'No printers detected' in the
'New printer dialog' misses border.
This commit places the GtkLabel into a GtkFrame to achieve that.

https://bugzilla.gnome.org/show_bug.cgi?id=749883
2015-06-16 16:35:48 +02:00
Marek Kasik
fb49b256f5 printers: Don't expand search entry
Don't expand search entry when device detection ends.
Place the GtkSpinner into a GtkFixed to achieve that.

https://bugzilla.gnome.org/show_bug.cgi?id=749883
2015-06-16 16:35:45 +02:00
Marek Kasik
b5b421288c printers: Fix setting of page size
Set 'PageSize' instead of 'media' for new printers since we use PPD
for construction of the combo for selecting of default paper size.
Previously, we've been setting 'media' attribute for new printers.
Attribute 'media' is used by IPP but we set paper size using 'PageSize'
which comes from PPD in the options dialog. Sometimes (quite often) IPP
gets priority over PPD in print systems. Therefore there was inconsistency
of what user set as default paper size on the options dialog and what was used.

Also don't mark IPP and user's local options as default in PpPPDOptionWidget
since it should use just PPD (we can change PPD values only in this widget).
Since we use PPD for setting of paper size in the options dialog, we shouldn't
show a value which user does not change actually (IPP's 'media' vs. PPD's
'PageSize').

https://bugzilla.gnome.org/show_bug.cgi?id=748569
2015-06-12 16:23:45 +02:00
Marek Kasik
80dce1ee4c printers: Remove unused function
Function printer_set_default_media_size() is not used anywhere
in Printer panel.

https://bugzilla.gnome.org/show_bug.cgi?id=748569
2015-06-12 16:23:42 +02:00
Marek Kasik
da9b74061f printers: Install selected printer when the row is activated
Allow user to install printer by activating a row with a found device.

https://bugzilla.gnome.org/show_bug.cgi?id=748206
2015-06-10 11:35:04 +02:00
Marek Kasik
7672eddec9 printers: Fix focus chain of the 'New printer dialog'
Disable 'can-focus' for widgets which don't need that
in the 'New printer dialog'.

https://bugzilla.gnome.org/show_bug.cgi?id=748206
2015-06-10 11:35:01 +02:00
Marek Kasik
bfd6423dc9 printers: Set focus of the 'New printer dialog' correctly
Show the 'New printer dialog' after setting transient parent for it
so that the warning about missing transient parent is not shown
to the user and the dialog is correctly focused.

https://bugzilla.gnome.org/show_bug.cgi?id=748206
2015-06-10 11:34:57 +02:00
Martin Hatina
7b6b3aac39 printers: Fix possible crash after closing the panel
Disconnect on_lockdown_settings_changed and on_permission_changed signals
when printers panels is being disposed, so they won't get called after panel
no longer exists.

https://bugzilla.redhat.com/show_bug.cgi?id=1218003
https://bugzilla.gnome.org/show_bug.cgi?id=750019
2015-06-09 14:35:01 +02:00
Marek Kasik
30a743a94c printers: Update printer options correctly
Set 'ppd_filename_set' and 'destination_set' always to FALSE
before requesting the destination and updated PPD file so we can
distinguish when we have all information needed for update
of the PpPPDOptionWidget.

https://bugzilla.redhat.com/show_bug.cgi?id=1211580
2015-04-16 15:14:07 +02:00
Prince781
e01951ede8 printers: Recognize more supply types
Recognize 'inkCartridge' and 'tonerCartridge' supply types.

https://bugzilla.gnome.org/show_bug.cgi?id=743331
2015-04-14 16:29:05 +02:00
Marek Kasik
3a068dae10 printers: Improve add printer search text
Use a clearer text in the new printer dialog as hint in the search box.

https://bugzilla.gnome.org/show_bug.cgi?id=690366
2015-01-21 13:47:06 +01:00
Rui Matos
1df796ac28 printers: Drop remaining deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2015-01-08 19:04:53 +01:00
Marek Kasik
da15e2ebcf printers: Remove border around model name
The border was not there in 3.10 and it is not
intended to be there in 3.14.

https://bugzilla.gnome.org/show_bug.cgi?id=740811
2014-11-27 15:24:26 +01:00
Marek Kasik
6be06156e6 printers: Fix spacing in Jobs dialog
Increase spacing in the VBox to 10 as in other dialogs.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
49b71fa843 printers: Don't use properties of deprecated widgets
Replace xalign and yalign properties by halign and
valign wherever needed.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
a5c6e53f65 printers: Remove usage of deprecated GtkAlignment
Use halign and valign of children instead of adding
GtkAlignment and setting of xalign and yalign.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
8c67e72821 printers: Fix padding of a progress text
Set padding of the text "Setting new driver" at runtime so that
it is aligned with other fields properly.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
38958903ee printers: Add GtkLabel with printer model name
Place a custom GtkLabel with name of printer model
into "printer-model-button". This is needed for us to be
able to align the text and keep the button filling all available
horizontal space.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
66eb1c9164 printers: Don't use methods of deprecated GtkMisc
Use GtkWidget's methods for settings of halign, valign and margin-start
instead of GtkMisc's methods for settings of xalign, yalign and xpad.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
15b5045ed3 printers: Don't update alignment padding for dialogs
The update of alignment padding is not needed since gtk+ 3.14.
It was needed for proper alignment of widgets of action area
with those from content area.

https://bugzilla.gnome.org/show_bug.cgi?id=739737
2014-11-25 12:01:17 +01:00
Marek Kasik
2d2f20fe53 printers: Use correct type for window id
Window id should be unsigned int and not int. Also the default
value should be 0 instead of the 631 (a copy paste error).

https://bugzilla.gnome.org/show_bug.cgi?id=740115
2014-11-14 14:32:14 +01:00
Marek Kasik
873c22e9d4 printers: Make driver installation dialog modal
Pass XID of correct window to InstallPrinterDrivers and
InstallPackageNames methods.

https://bugzilla.gnome.org/show_bug.cgi?id=740115
2014-11-14 14:32:11 +01:00
Matthias Clasen
e6c2ac9c92 printers: Improve scrolling in new printers list
In order to automatically keep the selected row scrolled in view,
the treeview must be a direct child of the scrolled window. Make
it so by flipping the order of the stack and the scrolled window.

https://bugzilla.gnome.org/show_bug.cgi?id=739600
2014-11-05 09:44:04 -05:00
Marek Kasik
12c4777c06 printers: Don't crash for URIs with leading "//"
Initialize result of getting of LPD devices early to avoid crash.

https://bugzilla.gnome.org/show_bug.cgi?id=738165
2014-10-10 12:31:07 +02:00
Michael Catanzaro
7b33be9d14 printers: Fix multiple definitions of libprinters_la_CPPFLAGS
CUPS_CPPFLAGS is in AM_CPPFLAGS, so we can just remove the first
definition (which I guess has been ignored).
2014-09-05 22:50:17 -05:00
Marek Kasik
4b64a64124 printers: Add test for canonicalize_device_name()
Add a test which tests function canonicalize_device_name() which
canonicalize name of printer model so it doesn't contain
unwanted strings/characters.
Test data are in canonicalization-test.txt file.

https://bugzilla.gnome.org/show_bug.cgi?id=695564
2014-07-31 11:44:17 +02:00
Marek Kasik
994bc0735a printers: Strip redundant strings from found devices
Remove strings like "foomatic", "series" from names of found devices.
Remove leading, trailing and recurrent dashes.

https://bugzilla.gnome.org/show_bug.cgi?id=695564
2014-07-31 11:44:17 +02:00
Marek Kasik
88fa618aca printers: Add function shift_string_left() and its test
shift_string_left() shifts given string by 1 character to the left.
test-shift.c tests whether function shift_string_left() works correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=695564
2014-07-31 11:44:17 +02:00