Commit Graph

1314 Commits

Author SHA1 Message Date
Marek Kasik
fda120ceec printing: Install printbackends
Add "install : true" for each printbackend so that they are installed.

https://bugzilla.gnome.org/show_bug.cgi?id=789185
2017-10-26 09:49:13 +02:00
Chun-wei Fan
a65730f38f modules/input/gtkimcontextime.c: Fix build
The GdkEvent structure became opaque, so we need to update the code so
that we use the getters and setters here.

https://bugzilla.gnome.org/show_bug?id=773299
2017-10-25 00:46:11 +08:00
Marek Kasik
3d233743ec printing: Don't show duplicate printers
Check UUID for printers obtained via DNSSD whether
they are already installed on local CUPS server.
Don't show such printers.

Not all printers published via DNSSD have UUID entry though.

https://bugzilla.gnome.org/show_bug.cgi?id=786794
2017-10-09 17:54:50 +02:00
Matthias Clasen
974b99694d xim: Convert to GdkEvent API 2017-09-19 18:39:02 +02:00
Carlos Garnacho
668bb1bddd modules: Update input context impls to using GdkEvent API 2017-09-19 18:39:02 +02:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Matthias Clasen
916702f7a9 Make the xim module build without root getters
This is X specific code anyway, so no need to use
generic GDK api for this.
2017-08-11 15:45:24 -04:00
John Ralls
a2c4c54a2f Duplicate the TIC strings before NULLing the GObject data.
NULLing the data strings in GObject frees and invalidates the pointers
returned by g_object_get_data so we need our own copy of the values.
2017-08-08 23:21:55 +03:00
John Ralls
a72c735b74 Fix compile error in imquartz.c due to API change in GtkIMContext. 2017-07-18 18:44:21 -07:00
Chun-wei Fan
ac5f7d028f modules/input/gtkimcontextime.c: Move to set_client_widget
The imcontext internals have been changed to use set_client_widget
instead of set_client_window in order to remove API dependency on
GdkWindow.  Update the Windows IME support so that the code will
continue to build and work.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-06-06 00:17:40 +08:00
Carlos Garnacho
d39afa6011 imcontext: Remove API dependency on GdkWindow
There is now a set_client_widget() to hint the IM about positioning
and whatnot.
2017-05-25 16:25:58 +02:00
Tim-Philipp Müller
88900814cd meson: simplify cups version check in printbackends
Using cc.compute_int() instead of cc.get_define() for now
as there seems to be some issue with get_define() (#1726).
2017-05-03 18:40:56 +01:00
Emmanuele Bassi
91dee46497 build: Use get_pkgconfig_variable()
There's no need to run pkg-config ourselves.
2017-05-03 15:10:57 +01:00
Emmanuele Bassi
17518ef89b build: Improve consistency of the "coding" style
We're mixing a lot of styles in the Meson build files. This is an
attempt at making everything slightly more consistent in terms of
whitespace and indentation.
2017-05-03 15:10:57 +01:00
Emmanuele Bassi
1afd415583 build: Clean up print backends Meson rules 2017-05-03 15:10:57 +01:00
Emmanuele Bassi
81341c042b build: Disable deprecation warnings for input methods 2017-05-03 15:10:57 +01:00
Tim-Philipp Müller
e850973956 meson: build input modules
We have to work around some ordering problems here. We still
manage to keep most of the guts in modules/input/meson.build,
so it's not too ugly overall.

(The autotools build solves this with a 'make -C ../../input/modules'
inside gtk/Makefile, but that's not something we can or want to do.)
2017-05-03 15:10:56 +01:00
Tim-Philipp Müller
412c2225b1 meson: move colord checks into cups printbackend
Which is the only user of it. Also add option to enable/disable.
2017-05-03 15:10:55 +01:00
Tim-Philipp Müller
d38db4dcdd meson: gtk: set GTK_PRINT_BACKENDS define properly 2017-05-03 15:10:55 +01:00
Tim-Philipp Müller
a35e5f3135 meson: modules: add printbackends
The cups checks might not work properly everywhere yet,
since they don't use cups-config and parse the output yet.
2017-05-03 15:10:55 +01:00
Emmanuele Bassi
71ad17cae1 Remove gdkkeysyms-compat.h
The compatibility header was needed after GTK+ 3.0 renamed the key
symbols from `GDK_*` to `GDK_KEY_*` to avoid collisions.
2017-05-03 14:54:37 +01:00
Matthias Clasen
41389ca98c Avoid some compiler warnings 2017-03-23 15:15:12 +00:00
Piotr Drąg
bfaed659f1 Fix translator comments
They need to be exactly one line above a string to show up in .po files.
2017-01-28 01:13:12 +01:00
Piotr Drąg
1b6015f9cc gtkprintbackendfile: Correct PostScript capitalization
https://bugzilla.gnome.org/show_bug.cgi?id=776627
2017-01-02 16:20:29 +01:00
Benjamin Otte
9120bdd9e9 xim: Use the native parent window for the X connection
Don't try to gdk_window_get_xid() on the current window.
2016-12-09 18:35:51 +01:00
Carlos Garcia Campos
c836be0508 printing: Do not truncate job names in GtkPrintOperation
We are currently truncating job names to 255 bytes, because that's the
maximum allowed length of job-name attribute in CUPS. This is a CUPS
limitation that GtkPrintOperation shouldn't need to know, and it
shouldn't affect other backends, that might have other limitations or
even no limitation at all. This has another side effect, that what you
set as GtkPrintOperation:job-name could be different to what you get if
the property is truncated, this is not documented in
gtk_print_operation_set_job_name(). So, I think the job name should be
truncated by the CUPS backend, right before setting the job-name
attribute.

https://bugzilla.gnome.org/show_bug.cgi?id=774097
2016-11-10 16:57:30 +01:00
Matthias Clasen
e4e6cb87b2 Rename gtk-query-immodules to follow our binary naming scheme
Instead of gtk-query-immodules-4.0, lets call it gtk4-query-immodules,
to use the same prefix as all the other versioned binaries.
2016-10-18 09:59:42 -04:00
Benjamin Otte
0be88cc76e API: Remove gdk_screen_get_width() and gdk_screen_get_height()
... and gdk_screen_get_width_mm() and gdk_screen_get_height_mm() and
the shortcut counterparts that call these functions on the default
screen.

Modern display servers don't provide an ability to query the size of a
screen or display so we shouldn't allow that either.
2016-10-16 18:17:21 +02:00
Matthias Clasen
d053d5c58f Rename Makefile references from 3.0 to 4.0
This is almost certainly incomplete.
Needs careful scrutiny
2016-10-07 10:34:50 -04:00
Javier Jardón
101da71ee3 Use upstream gettext
https://bugzilla.gnome.org/show_bug.cgi?id=373745
2016-05-16 20:46:19 +01:00
Matthias Clasen
d1b07bc386 Add a comment to explain numbers here
This explains the change in the previous commit.
2016-04-19 07:34:44 -04:00
Piotr Drąg
3fe08b3b28 cups: Fix duplicate string
https://bugzilla.gnome.org/show_bug.cgi?id=765122
2016-04-19 07:25:17 -04:00
Bastien Nocera
97d27ca2f8 cups: Fix gettext usage
The previous patches didn't mark some strings as to be translated, and
tried to translate strings with a variable part already inside the
string, which isn't going to work.

Mark the strings as translatable with context, and also make sure to
translate static strings when getting them out of their structure.

https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-16 18:43:12 +02:00
Felipe Borges
b0b1bf2f58 cups: make string non-literals translatable again
Notice that C_ just takes string literals as arguments.

https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-14 18:55:21 +02:00
Felipe Borges
027702e453 cups: Fix more "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-13 14:17:24 +02:00
Bastien Nocera
93363551d7 cups: Fix "format not a string literal" error
https://bugzilla.gnome.org/show_bug.cgi?id=764585
2016-04-05 12:58:58 +02:00
Matthias Clasen
a64dd9ccf3 printing: Add message contexts
Some of the translated strings in the cups printbackend are short
and generic and might occur in other contexts. Give them disambiguating
message contexts to avoid translation problems.
2016-02-16 18:32:43 -05:00
Chun-wei Fan
d07f00d98f CJK Windows: Silence gtk_style_context_set_state() warnings
We need to update calls to gtk_style_context_set_state() in
gtkimcontextime.c, so that the state passed into that function would be in
line with what GtkStyleContext expects, due to updates in the CSS
machinery, as outlined in this link[1], which is based on information in
in Matthias' blog[2].

Doing so will silence the gtk_style_context_set_state() warnings, which is
emitted when a widget uses gtkimcontext on Windows with CJK IME, which will
in turn call gtkimcontextime.

[1]: http://feaneron.com/2016/01/04/quick-guide-to-port-an-app-for-gtk-3-20/
[2]: https://blogs.gnome.org/mclasen/2015/11/20/a-gtk-update/

https://bugzilla.gnome.org/show_bug.cgi?id=760314
2016-01-08 23:37:31 +08:00
Felipe Borges
98080e0289 printing: always propagate Collate value
https://bugzilla.gnome.org/show_bug.cgi?id=728344
2016-01-06 14:50:49 +01:00
John Ralls
571704824f Bug 753992 - im-quartz discard_preedit segmentation fault
Replace checking if the NSView is really a GdkWindow, which will crash
in the likely event it's not a GObject, with ensuring that the parent
GdkWindow is really a GdkWindowQuartz.
2015-10-03 22:28:36 -04:00
Michael Weghorn
bf9c9f1762 Don't mix in user options of printer instances
GTK+ currently does not support printer instances in the printing
dialog. This commit avoids user options set for specific instances of
a printer being accidently applied to the printer with the same name but
no specific instance defined.

https://bugzilla.gnome.org/show_bug.cgi?id=753628
https://bugzilla.gnome.org/show_bug.cgi?id=582747
2015-09-24 18:14:07 +02:00
Michael Weghorn
838391e420 Improve printer distinction for option retrieval
In order to retrieve the user options for a printer, the respective
printer name is used.
This fixes the comparison of printer names to avoid that the options of
another printer are accidently read whose name starts with the same
letters, but is longer (e.g. "myprinterlongername" instead of
"myprinter").

This fixes Bug 753628.
2015-09-11 15:19:35 +02:00
Matthias Clasen
24174e5528 multipress: Only emit preedit signals if needed
When clearing the compose buffer, don't emit preedit-changed
unconditionally. This triggers a recursion which leads to
a crash.

https://bugzilla.gnome.org/show_bug.cgi?id=753644
2015-08-18 15:44:45 -04:00
Matthias Clasen
0ee14211b1 cups: Annotate a call whose return value we don't care about
We're closing this fd, but we're not going to do anything else
if that fails. Annotate to let coverity see this.
2015-07-17 16:11:17 -04:00
Emmanuele Bassi
e259b2f30d Avoid O(n²) walking of string arrays
"Yo, we heard you like traversing NULL-terminated arrays to operate on
them, so we called g_strv_length() as the for condition, so you can
iterate the array while iterating the array."

Instead of making famed rapper and television producer Xzibit proud, we
should avoid calling g_strv_length() on an array while looping on the
array, to avoid quadratic complexity.

We do this in various places that deal with arrays of strings that we
cannot really guess are short enough not to matter — e.g. the list of
CSS selectors in the inspector, or the required authentication
information for printing.
2015-07-16 16:19:55 +01:00
Marek Kasik
4e4a2fe17e printing: Get output bin via IPP
Request "output-bin-supported" and "output-bin-default" attributes through
IPP if there is no PPD for selected printer.
Pass "output-bin" option with other options in printer_get_options().
Translate standard IPP values of "output-bin" option.

https://bugzilla.gnome.org/show_bug.cgi?id=725441
2015-06-23 13:36:57 +02:00
Matthias Clasen
23032587db printing: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
2015-06-02 09:08:14 -04:00
Marek Kasik
b4f06ca49f printing: Check connection to remote CUPS server on correct port
Add parameter for specification of port to gtk_cups_connection_cups_new().
Use default port returned by ippPort() if the given port is lower than 0.

https://bugzilla.gnome.org/show_bug.cgi?id=693738
2015-05-13 12:28:49 +02:00
Andre Heinecke
e99e282b5a Prevent empty password request popup for kerberos
If auth_info_required is only set to "negotiate" the
    request password dialog is shown anyway for each print
    job without any input fields. As the request_password
    dialog only handles username, password and domain.

    https://bugzilla.gnome.org/show_bug.cgi?id=669008
2015-03-09 14:19:57 +01:00
Marek Kasik
c2aff4ab6e printing: Set printer state correctly
Consider NULL printer state message as empty too.
Printer state IPP_PRINTER_STOPPED can be considered as paused state.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-03-02 10:51:07 +01:00
Marek Kasik
f74067dda2 printing: Always get details of Avahi printers via IPP
Request details of Avahi browsed printers even when
we've got their PPDs already. Some options are not
present in PPD.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-02-25 15:58:23 +01:00
Marek Kasik
979a4c1b08 printing: Get covers for each printer individually
Since we combine Avahi browsed printers and
printers of local CUPS in one backend we need to
get covers for each printer separately.

https://bugzilla.gnome.org/show_bug.cgi?id=743323
2015-02-25 15:58:19 +01:00
Matthias Clasen
b0b38c106d Make gtk-im-context-none work
This was added a few years ago, as a way to have _no_ im context
at all. But it didn't actually work. Make it work, and streamline
the handling of none by moving it all to gtkimmodule.c.

As part of this, add context to the translated names of all
im modules we ship.
2015-02-23 22:06:02 -05:00
Marek Kasik
00f9f1cc6b printing: Use correct units for margins taken via IPP
cups_printer_get_hard_margins() returned margins in millimeters
for margins taken via IPP request instead of Units used before.
2015-02-20 12:27:12 +01:00
Maks Naumov
87d36885ac Properly check result of g_utf8_get_char_validated()
g_utf8_get_char_validated() may return -1 or -2
return type is gunichar(guint32)

Therefore such checks like 'gunichar < 0' or 'gunichar > 0'
are always 'false' or 'true'(except when gunichar == 0).

Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742774
2015-01-11 15:46:06 -05:00
John Ralls
4bd787f2af Prevent double-free after 8b5d30d43. 2014-12-24 12:50:57 -08:00
Marek Kasik
059fc5d3d9 printing: Fix build with CUPS older than 1.6
Define missing functions ippFirstAttribute(), ippNextAttribute()
and macro ippGetCollection(). These were added in CUPS 1.6.

https://bugzilla.gnome.org/show_bug.cgi?id=740358
2014-11-27 17:07:33 +01:00
Andre Heinecke
d9786d74db Remove overzealous validity check for secrets
We directly get the length of the secret from the g_variant
   and use it in a following g_strndup which ensures that the
   resulting string is terminated.

   This fixes reading secrets which were stored by system-config-printer.

https://bugzilla.gnome.org/show_bug.cgi?id=740612
2014-11-25 22:51:45 -05:00
Marek Kasik
a4a38dff0d Get media-col-default attribute correctly
Fix a typo which caused that "number-up-supported" and "media-col-default"
IPP attributes were not requested correctly.

https://bugzilla.gnome.org/show_bug.cgi?id=725441
2014-10-16 15:02:59 +02:00
Marek Kasik
493aa4e9b3 Get duplex option via IPP
Request "sides-supported" and "sides-default" attributes through
IPP if there is no PPD for selected printer.
Pass "sides" option with other options in printer_get_options().
Add function setup_ipp_option() for creating of IPP option
of given name with passed choices and default value.
Mark such an option as "is-ipp-option" so we can distinguish it
later.

https://bugzilla.gnome.org/show_bug.cgi?id=725441
2014-10-13 11:58:18 +02:00
Marek Kasik
e78c3e2c8c Get paper sizes from IPP query
Query printer via IPP for paper sizes if there is no
or empty PPD file.
Parse "media-supported" and "media-size-supported" attributes for list
of paper sizes. Parse "media-default" and "media-col-default" attributes
for default settings.

https://bugzilla.gnome.org/show_bug.cgi?id=725441
2014-10-10 13:40:27 +02:00
Marek Kasik
a73c858f4b Remove dead code from CUPS backend
https://bugzilla.gnome.org/show_bug.cgi?id=725441
2014-10-10 13:40:24 +02:00
Benjamin Otte
c750cea4e5 imcontextxim: Remove broken custom drawing code
Just use regular GtkWindow styling instead.
2014-10-03 15:51:45 +02:00
Marek Kasik
8b5d30d439 Remove redundant checks for NULL
Remove checks for NULL before g_free() and g_clear_object().
Merge check for NULL, freeing of pointer and its setting
to NULL by g_clear_pointer().

https://bugzilla.gnome.org/show_bug.cgi?id=733157
2014-10-02 19:06:03 +02:00
Matthias Clasen
7182ae4f45 printing: Better typography
Use U+201C/U+201D for quoting.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:22 -04:00
Matthias Clasen
60f0445233 Printing: Better typography
Use U+007D MULTPLICATION SIGN for dimensions.

https://bugzilla.gnome.org/show_bug.cgi?id=735192
2014-09-29 23:05:20 -04:00
Руслан Ижбулатов
45ab4ae09b build: Set no_undefined in Makefile.decl
This simplifies the code and - more importantly - fixes the cases like
in testsuite/reftests where the no_undefined definition was missing.

https://bugzilla.gnome.org/show_bug.cgi?id=736382
2014-09-15 16:35:40 +02:00
Andre Heinecke
382d68ff8e Use secrets service for cups auth_info
When a printer requires auth_info (e.g. a printer connected
    over the samba protocol) it is now possible to save the
    credentials necessary for printing if a secrets service
    is available over dbus.
    The auth_info is then stored / loaded from the default
    collection of that secrets service.
    If no such service is available the user is not shown
    the option to remember the password and the behavior
    remains the same as before.

    https://bugzilla.gnome.org/show_bug.cgi?id=674264
2014-09-01 22:39:51 +02:00
Simon McVittie
d329544e70 Use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE, _XOPEN_SOURCE etc.
Similar to Bug #684123 in GLib.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=641638
Bug-Debian: https://bugs.debian.org/756476
Reviewed-by: Matthias Clasen
2014-08-21 09:54:12 +01:00
Руслан Ижбулатов
694c8d32d5 Fix various warnings about unused things
https://bugzilla.gnome.org/show_bug.cgi?id=734735
2014-08-13 23:38:47 +00:00
John Ralls
e3b8c4efeb Bug 729924 - Crash trying to print in OSX
We should only use the PageSize option from the ppd if it
actually exists.
2014-08-03 11:50:50 +02:00
Javier Jardón
c5b0ae5574 docs: Change documentation to consistenly use "Returns:"
Instead "Return value:" or "Return:"
2014-07-10 16:54:34 +01:00
Matthias Clasen
59c9d24bbf inspector: stop being a module
Moving the inspector into libgtk lets use reuse internals without
having to add public API for everything or inventing awkward private
call conventions.

https://bugzilla.gnome.org/show_bug.cgi?id=730095
2014-05-14 21:23:44 -04:00
Matthias Clasen
0ee35aa27b inspector: Show text view subobjects in the tree 2014-05-13 15:20:37 -04:00
Rico Tzschichholz
22eaffba59 Inspector: Fix make dist 2014-05-13 12:27:02 +02:00
Matthias Clasen
f3227688b4 inspector: Fix button path placement 2014-05-10 22:04:37 -04:00
Matthias Clasen
8475540103 inspector: Add a visual tab
Move the show updates and flip text direction controls here,
and add controls for baseline and pixel cache debugging.
2014-05-10 22:04:37 -04:00
Matthias Clasen
a145dd7097 Add data-list.ui to list of templates 2014-05-10 22:04:36 -04:00
Matthias Clasen
975677872f inspector: Add minimal signal tracing
Add rudimentary signal tracing. The signals tab can now count signal
emissions for all signals of the current object.
2014-05-10 22:04:35 -04:00
Matthias Clasen
a0cae6957e inspector: clean up better when objects go away
Instead of manually doing it everywhere, just call set_object (NULL)
from the selection_changed handler. Fix all the set_object() functions
to deal with NULL.
2014-05-10 22:04:35 -04:00
Matthias Clasen
cb85a1fa3a inspector: Improve the Inspect tooltip 2014-05-10 22:04:34 -04:00
Matthias Clasen
be532bc196 inspector: Add a button for rtl flipping
Nice to have a quick way of testing this everywhere.

The implementation is not quite perfect: due to the way text
direction works in GTK+, widgets that appear in the inspector
window while we are flipped will inherit the flipped direction
instead of the fixed direction of the inspector window.
2014-05-10 22:04:34 -04:00
Matthias Clasen
a089ccf5f0 inspector: Add a minimal Data tab
This will eventually show useful information about the content
of tree models.
2014-05-10 22:04:33 -04:00
Matthias Clasen
9655337407 inspector: Hide tabs instead of making them insensitive 2014-05-10 22:04:33 -04:00
Matthias Clasen
6303e62440 inspector: Make button path non-homogeneous 2014-05-10 22:04:32 -04:00
Matthias Clasen
e7d3323ba7 inspector: Avoid size changes of button path 2014-05-10 22:04:32 -04:00
Matthias Clasen
46b6a32ef0 inspector: Reorder tabs 2014-05-10 22:04:31 -04:00
Matthias Clasen
bf46950a09 inspector: Move scrolledwindow into prop list template 2014-05-10 22:04:31 -04:00
Matthias Clasen
c744699201 inspector: Avoid a double scrolled window 2014-05-10 22:04:30 -04:00
Matthias Clasen
d4522f54e7 inspector: Make notebook scrollable 2014-05-10 22:04:30 -04:00
Matthias Clasen
6824527cc4 inspector: Add models to the tree
It makes sense to add the models of tree views, icon views
and combo boxes to the tree.
2014-05-10 22:04:29 -04:00
Matthias Clasen
d64a9615bc inspector: Make value ellipsized
The values can get long, so ellipsize them.
2014-05-10 22:04:29 -04:00
Matthias Clasen
2af94dff1c inspector: Add cell areas into the tree 2014-05-10 22:04:28 -04:00
Matthias Clasen
9467c56b94 inspector: Rename Widget Tree to Objects 2014-05-10 22:04:28 -04:00
Matthias Clasen
700657ad19 inspector: Deal with dying objects
The widget-tree was not safe against object just going away.
Fix this by using row references instead of iters where
necessary, and by using weak refs to clean up when objects
die.
2014-05-10 22:04:28 -04:00
Matthias Clasen
0dbfef5696 Trivial: shorten some variable names 2014-05-10 22:04:27 -04:00
Matthias Clasen
e9cc859051 inspector: Add a Label column
Move the UI strings over to that column, and use the buildable
ID for the name column, where available.
2014-05-10 22:04:27 -04:00
Matthias Clasen
8a6421ac30 inspector: Show the default GApplication in the tree
This is a handy object to have quickly available.
2014-05-10 22:04:26 -04:00
Matthias Clasen
83503cbf20 inspector: Don't flash the window initially
This is flickery, and not really necessary.
2014-05-10 22:04:26 -04:00
Matthias Clasen
768a437c02 Work around a GtkBuilder deficiency
It turns out that an <object> with just a <signal> in it does
not work right in GtkBuilder. Work around by adding a property.
2014-05-10 22:04:25 -04:00
Matthias Clasen
cda706b522 inspector: Don't show mapped/realized/visible in the tree
It does not really add much over the sensitive/insensitive rendering
that is already indicating which widget is mapped. At the same time,
set up signal handlers so we can update that when the widget changes.
2014-05-10 22:04:25 -04:00
Matthias Clasen
e249c6d6ee inspector: Don't leak signal handlers
Not only was the property list connecting to notify::bla for
each property individually, it was also leaking the signal
handlers when the selected object changed. Fix both.
2014-05-10 22:04:25 -04:00
Matthias Clasen
86adead803 inspector: Minimal support for attributes
Show mapping information for cell renderer properties; no editing
yet.
2014-05-10 22:04:24 -04:00
Matthias Clasen
e87addd9ae inspector: Show interfaces in the object hierarchy
This gives a more complete picture.
2014-05-10 22:04:24 -04:00
Matthias Clasen
bf9d22f10f inspector: Add columns and cell renderers to the tree
These are interesting objects that are worth displaying in the tree.
2014-05-10 22:04:23 -04:00
Matthias Clasen
4a68eb6250 inspector: Improve handling of object-valued properties
When showing the objects in the tree, use the property name
as the name thats shown in the list. This makes it easier
to differentiate e.g. hadjustment and vadjustment in a
GtkScrolledWindow.
2014-05-10 22:04:23 -04:00
Matthias Clasen
9b65955961 inspector: Fix object-valued properties
The code for dealing with object-valued properties had several
bugs that lead to crashes. This change makes it work.
2014-05-10 22:04:23 -04:00
Matthias Clasen
08f2456d5f inspector: Change label of widget tree
The tree contains other objects besides widgets, so label it
'Objects'.
2014-05-10 22:04:22 -04:00
Matthias Clasen
c9dba4b8e0 inspector: Show signals
Add a tab that shows available signals for each object. For now,
we only show if each signal has handlers connected or now. More
functionality will be added later.
2014-05-10 22:04:22 -04:00
Matthias Clasen
5fa71c69d8 inspector: Select a window initially
The list of toplevels also includes hidden combobox popups
and the like, so we have to be a little careful. To ensure
the right choice, we now pick the first visible window
that is not a GtkInspectorWindow.
2014-05-10 22:04:21 -04:00
Matthias Clasen
a3713b51ff inspector: Drop an unused function 2014-05-10 22:04:21 -04:00
Matthias Clasen
e586af3cf4 inspector: Make translatable
Mark strings in the source and in the templates as translatable.
We use the same extract-strings utility as for libgtk itself.
2014-05-10 22:04:20 -04:00
Matthias Clasen
643b6f147b Move modules/other/parasite to modules/inspector
No need for the extra subdirectory, and the name should
match the module name.
2014-05-10 22:04:20 -04:00
Matthias Clasen
ccff3e952d Rename parasite to gtkinspector
This avoids namespace collisions with the original
gtkparasite project, and adds the gtk prefix to
all symbols and type names.
2014-05-10 22:04:20 -04:00
Matthias Clasen
87e3484aa7 parasite: Don't open a window upon load
Instead, we want to let GTK+ open a window whose life-cycle
it can control. We just ensure that all our types are registered
when the module is loaded, so GTK+ can find them.
2014-05-10 22:04:18 -04:00
Matthias Clasen
38bbde200e parasite: Two fixes for the property cell renderer 2014-05-10 22:04:18 -04:00
Matthias Clasen
d7c5b55846 parasite: Some formatting cleanup 2014-05-10 22:04:18 -04:00
Matthias Clasen
36494dc8f4 parasite: Include file cleanup 2014-05-10 22:04:17 -04:00
Matthias Clasen
5b249be1f9 parasite: Use a template for window 2014-05-10 22:04:17 -04:00
Matthias Clasen
33ccb00221 parasite: some formatting tweaks 2014-05-10 22:04:17 -04:00
Matthias Clasen
33d2044406 parasite: Use a template for themes 2014-05-10 22:04:16 -04:00
Matthias Clasen
ee7cc6d189 parasite: Use a template for prop list 2014-05-10 22:04:16 -04:00
Matthias Clasen
ead05d0954 parasite: Use template for widget tree 2014-05-10 22:04:15 -04:00
Matthias Clasen
6f1a786413 parasite: Use template for classes list 2014-05-10 22:04:15 -04:00
Matthias Clasen
0eb330613b parasite: Use template for css editor 2014-05-10 22:04:15 -04:00
Matthias Clasen
3c22fc4ef6 parasite: Use template for object hierarchy 2014-05-10 22:04:14 -04:00
Matthias Clasen
3f5d21abec parasite: Use template for button path 2014-05-10 22:04:14 -04:00
Matthias Clasen
e43aeb9a1f parasite: Allow panes to shrink
The notebook is too wide.
2014-05-10 22:04:14 -04:00
Matthias Clasen
5fcd6ba21b parasite: Use the right icon name for inspect 2014-05-10 22:04:14 -04:00
Matthias Clasen
828acee981 parasite: Don't show hicolor as an icon theme
It really isn't.
2014-05-10 22:04:13 -04:00
Matthias Clasen
9bc7cfa6ba parasite: Don't show key themes
But show the builtin theme, even if it doesn't show up in the
filesystem.
2014-05-10 22:04:13 -04:00
Matthias Clasen
9fbb704418 parasite: Turn the inspect button back into an image button 2014-05-10 22:04:12 -04:00
Matthias Clasen
8f96238194 parasite: Make flashing work better
The positioning of the highlight window was not reliable; instead
just use a after-handler for the draw signal, in the same way that
drag highlights are drawn by GTK+ itself.

And copy the code for grabbing a widget via pointer from testgtk;
that code is known to work.
2014-05-10 22:04:12 -04:00
Matthias Clasen
01cb166819 parasite: Drop an unused field 2014-05-10 22:04:11 -04:00
Matthias Clasen
f78d91e5fc parasite: Make child properties insensitive when empty
When the selected object is not a widget, make the child property
list insensitive.
2014-05-10 22:04:11 -04:00
Matthias Clasen
413faa55a0 parasite: Display child properties too 2014-05-10 22:04:10 -04:00
Matthias Clasen
2166a9b163 parasite: Use a window group
By putting the parasite window in a separate group, we can interact
with it even when there is a modal dialog blocking the application
window
2014-05-10 22:04:10 -04:00
Matthias Clasen
81af602dda Initial import
This is a copy of https://github.com/chipx86/gtkparasite.git
with minimal edits to make it build.
2014-05-10 22:04:09 -04:00
Cosimo Cecchi
67981b1831 modules: remove the pixbuf engine directory
This is not used anywhere, and is commented out of the build because it
doesn't compile. Time for some spring cleaning...
2014-05-01 11:22:11 +02:00
Antoine Jacoutot
8ede929ef7 prevent redefinition of typedef GtkPrinterCloudprint
https://bugzilla.gnome.org/show_bug.cgi?id=727009
2014-03-25 12:24:41 +01:00
Marek Kasik
b95ce71b89 printing: Fail nicely when /tmp is not writable
Don't crash when /tmp is not writable when printing to file.
Show that getting of printer details failed for CUPS printers.

https://bugzilla.gnome.org/show_bug.cgi?id=693200
2014-03-17 14:37:34 -04:00
Rico Tzschichholz
239903d2f1 printbackends: Fix make dist 2014-03-03 07:33:53 +01:00
Tim Waugh
aaae0ca8ba New cloudprint GTK+ print module for Google Cloud Print.
This is a web service provided by Google that allows people to
share their printers (https://www.google.com/cloudprint/learn/).

In addition to being able to print to printers shared on Google Cloud
Print, there is an equivalent of "Print to file" in the form of "Save to
Google Drive".

The cloudprint module uses gnome-online-accounts to obtain the OAuth 2.0
access token for the Google account.

Currently it can discover available printers, get simple details about
them such as display name and status, and submit jobs without any
special options.

https://bugzilla.gnome.org/show_bug.cgi?id=723368
2014-02-28 11:45:03 +01:00
William Jon McCann
469d333aa2 docs: use Returns: consistently
Instead of Return value:
2014-02-19 18:56:05 -05:00
Andika Triwidada
0a768d274d Changed obsolete FSF portal addresses to web address
Fixed https://bugzilla.gnome.org/show_bug.cgi?id=721530
2014-01-12 19:56:49 +07:00
Marek Kasik
9513d3b2a4 printing: Don't leak http connection to CUPS
Close http connection to CUPS after execution
of request which created it.

https://bugzilla.gnome.org/show_bug.cgi?id=720535
2013-12-19 12:59:26 +01:00
Marek Kasik
083f834dd7 printing: Don't double free connection to CUPS
Don't call httpClose() on http connections which are created
outside of GtkCupsRequest in GtkCupsRequest's functions.

https://bugzilla.gnome.org/show_bug.cgi?id=720338
2013-12-14 16:33:02 -05:00
Jehan
4e4c248077 Bug 712536 - Themes with gap_(start|end)_file but no actual file crash
Code factorization in commit 34fd123 reintroduced bug fixed in 0d396ab
with non-equivalent factorized tests.
2013-12-05 00:53:17 +13:00
Marek Kasik
118b09c68c printing: Fix memory leak when listing Avahi printers
Return values of g_variant_get_child_value() were not unreffed
correctly together with one value returned by g_variant_get().
Use g_variant_get_data() instead of copying each byte separately.

https://bugzilla.gnome.org/show_bug.cgi?id=712799
2013-11-25 10:27:39 +01:00
Emmanuele Bassi
34fd1234a6 pixbuf-engine: Clean up error conditions and destructors
Simplify the error checks and move all common behaviour into a utility
function.

https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:17:07 -05:00
Emmanuele Bassi
01dfd8bb6e pixbuf-engine: Improve ThemePixbuf clean up functions
Make theme_pixbuf_destroy() NULL-safe like g_free(), and add a clear
function in the spirit of the g_clear_* family of functions.

https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:17:07 -05:00
Jehan
0d396abf22 Themes with specified gap images but no actual file crash.
https://bugzilla.gnome.org/show_bug.cgi?id=712536
2013-11-22 22:17:07 -05:00
Marek Kasik
376e2c003d printing: Don't wake up Avahi printers unnecessarily
Use info available in Avahi TXT records for creation of gtk printer
and request details when needed (through gtk_printer_request_details()).
If there is a printer advertised on Avahi by a remote CUPS server
try to get its PPD file at first or get its capabilities through an IPP
request if it fails.

https://bugzilla.gnome.org/show_bug.cgi?id=712751
2013-11-21 15:44:45 +01:00
Siegfried Gevatter (RainCT)
f682aabf74 Add print to PDF to recent manager
Printing a file with to PDF/etc. with the virtual printer option doesn't add
the file to the list of recently used files. It should be there, so I can
easily access it.

https://bugzilla.gnome.org/show_bug.cgi?id=668598
2013-11-14 03:56:47 -05:00
Alexander Larsson
4226f97d54 broadway: Support ipad on-screen keyboard
We add a custom im module for broadway that calls some broadway
specific APIs to show/hide the keyboard on focus in/out. We then forward this
to the browser, and on the ipad we focus an input field to activate
the keyboard.
2013-11-13 12:23:06 +01:00
Carlos Garcia Campos
6130f076be gtkprintbackendfile: Check the GtkPrintSettings passed to file_printer_get_options is not NULL before using it
https://bugzilla.gnome.org/show_bug.cgi?id=703784
2013-11-09 11:57:17 -05:00
Bastien Nocera
438cd857c4 all: Add names to timeouts
Add names to every timeout we setup, so it's easier to track their
usage, and debug possible misbehaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=710651
2013-10-23 13:31:18 +02:00
Timothy Arceri
c759cb7140 Remove unused function
https://bugzilla.gnome.org/show_bug.cgi?id=586107
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-06 01:27:06 -04:00
Timothy Arceri
481fc6b850 Remove a bunch of unused variables.
https://bugzilla.gnome.org/show_bug.cgi?id=586107
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-06 01:27:06 -04:00
Timothy Arceri
dae0951db4 Dont set enum to NULL fixes build issues on Solaris 10
https://bugzilla.gnome.org/show_bug.cgi?id=586107
Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
2013-10-06 01:27:06 -04:00
Ek Kato
0ae728e242 Fix missing return from quartz_filter_keypress 2013-08-29 14:12:09 -07:00
Ek Kato
08042ea830 Bug 705750 Quartz input method doesn't work correctly for Chinese characters
Modified from original for Gtk3.
2013-08-16 11:18:29 -07:00
Cody Russell
5ca0280cd3 Fix a crasher that was introduced by 9ca802161e
due to preedit_str being initialized as an empty string rather than NULL.
2013-08-15 15:08:34 -05:00
Michael Hutchison
9ca802161e Bug 705182 Reset Cocoa IME state when immodule is reset
Commits the pre-edit string on receipt of focus_out and reset
commands.
Patch refinements by Cody Russell <bratsche@gnome.org> and
Ek Kato <ek.kato@gmail.com>
2013-08-15 10:02:45 -07:00
Chun-wei Fan
3b82b97e73 GTK-Win32: Avoid Using Deprecated API
Replace the deprecated API calls with the updated APIs, and fix the build
of modules/input/gtkimcontextime.c, as we really needed
gdk/gdkkeysyms-compat.h (gdk/gdkkeysyms.h was already included)

https://bugzilla.gnome.org/show_bug.cgi?id=705068
2013-08-14 08:05:53 +08:00
Carlos Garnacho
493ca20912 ime: Add builtin handling of dead keys
The IME input method has been both ignoring keypresses of
non-spacing characters (ditching these as non displayable),
and not letting IME do anything about those.

Even though, the sparse documentation on IMM/IME seems to
hint that applications can't pipe non-spacing characters to
the input method manager, and experimentation shown that
those characters are indeed handled differently than how
it'd be expected.

Then, add basic handling of dead keys on the IME input method
itself , as it's not mutually exclusive with regular keymaps
with dead keys.

https://bugzilla.gnome.org/show_bug.cgi?id=704937
2013-07-29 20:04:45 -04:00
Takuro Ashie
20d0434b8c imquartz: Fallback to slave IM context if no NSEvent exists.
When an application translates a key event and drop its native event
before passing to imquartz, it can't recognize the NSEvent. On this
case imquartz doesn't emit any signals such as "commit" signal so
that the application doesn't insert any text. To avoid no response,
at least imquartz should fallback to slave GtkIMContextSimple.

https://bugzilla.gnome.org/show_bug.cgi?id=694273#c27
(cherry picked from commit c064e18894)
2013-07-27 14:26:22 -07:00
William Jon McCann
c6ca2374cc Deprecate and ignore gtk-im-status-style and gtk-im-preedit-style 2013-06-30 12:57:44 -04:00
William Jon McCann
2b571f41e2 Remove more discontinued ChangeLogs
They are all in git.
2013-06-24 19:53:08 -04:00
Marek Kasik
f29841a03e printing: Show correct status of a job
"job-state" is IPP_TAG_ENUM not IPP_TAG_INTEGER.
2013-06-06 11:09:36 +02:00
Colin Walters
1944e0368d modules/input: Only build quartz module if we're targeting quartz
Otherwise the build is broken on GNU/Linux and Win32.
2013-05-20 14:18:02 -04:00
E. K. Kato
155caad426 Bug 694273 - Patch to support NSTextInputClient in text widgets
Provides an input module for native OSX input methods.
Based on a patch by Hiroyuki Yamamoto
(http://www.sraoss.jp/sylpheed/sylpheed/macosx/gtk+-2.24.0-macosx-textinputclient_ja-test1.patch).
Adjustments for Gtk3 by Matthew Francis <gnomebugs@newsheffield.co.uk>
2013-05-20 10:48:32 -07:00
Marek Kasik
bdf40603d5 printing: Don't crash when printer-state-message not provided
Check whether "printer-state-message" was returned before its
usage.

https://bugzilla.gnome.org/show_bug.cgi?id=699750
2013-05-09 15:13:59 +02:00
Benjamin Otte
30a49f1d66 imcontexts: Include config.h first 2013-05-07 14:06:12 +02:00
Carlos Garcia Campos
2adacca119 gtkprintbackendfile: Fix infinite loop in _cairo_write()
It can happen if the io channel has been closed. In that case
g_io_channel_write_chars() returns early because of a g_return macro
that checks if the io channel is writable. When returning from g_return
macros, the bytes written output parameter is not updated and the error
is not filled, so the error is not detected and the written variable is
used uninitialized. We should check the return value of
g_io_channel_write_chars() to break the loop.

https://bugzilla.gnome.org/show_bug.cgi?id=685419
2013-04-14 12:19:09 +02:00
Matthias Clasen
e2ec223cd7 Don't free a list that has not been initialized 2013-04-09 21:18:05 -04:00
Carlos Garcia Campos
5701681df4 gtkprintbackendcups: Fix a crash in avahi_create_browsers()
In avahi_request_printer_list() a new connection to the DBus system bus
is started asynchronously, but it's not cancellable and it's not taking
any reference of the GtkPrintBackendCups. This means that when the
callback is called, the object might have been destroyed already. We can
just pass the cancellable created and check for the cancelled error in
the callback before trying to use the GtkPrintBackendCups. The code to
cancel avahi operations and to unsibscribe from the DBus signals has
been moved from finalize to dispose to make sure it happens as soon as
possible.

https://bugzilla.gnome.org/show_bug.cgi?id=696553
2013-03-25 14:58:03 +01:00
Carlos Garcia Campos
b29cd63c38 gtkprintbackendcups: Fix a crash in gtk_print_backend_cups_finalize()
If GtkPrintBackendCups is finalized and cups_get_printer_list hasn't
been called, g_object_unref is called for the GDBusConnection pointer
that is NULL. Use g_clear_object() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=696546
2013-03-25 14:40:50 +01:00
Marek Kasik
05901bdbbd printing: Use DBus calls instead of Avahi API
Converts usage of Avahi API to DBus calls. This change allows
us to remove dependency on avahi-gobject and avoids of possible
circular dependency.
Lists printers if Gtk+ is compiled with CUPS 1.6 or newer.
2013-03-13 15:33:56 +01:00
Marek Kasik
a727117acf printing: Remove usage of GError in connection test
Really remove usage of error in previous commit.

Related to
https://bugzilla.gnome.org/show_bug.cgi?id=695714
2013-03-13 15:25:45 +01:00
Marek Kasik
7529b95fab printing: Don't hang when getting info for Avahi printer
Asynchronously create testing connection to address returned
by GaServiceResolver. Don't request info for such printer if
the connection fails.

https://bugzilla.gnome.org/show_bug.cgi?id=695714
2013-03-13 14:59:10 +01:00
Marek Kasik
36d2324891 printing: Show Avahi printers on IPv6 network
Create correct URIs for printers on IPv6 networks.
2013-03-13 10:54:44 +01:00
Rico Tzschichholz
4054d531c3 printing: Fix build with -Werror=format-security 2013-03-06 22:26:21 +01:00
Marek Kasik
8075181033 printing: Mark texts for translation correctly
Use _() instead of N_() for printer states. Mark connection
string "; " for translation so it is correctly handled for
right to left languages.
2013-03-04 14:35:24 +01:00
Marek Kasik
4ba83ab573 printing: Remove unnecessary break
Remove the first space when connecting multiple printer states
together.

Related to
https://bugzilla.gnome.org/show_bug.cgi?id=688956
2013-03-04 14:34:21 +01:00
Marek Kasik
eed9e72e83 printing: List Avahi printers
Show printers advertised by avahi on local network. CUPS
backend now looks for _ipps._tcp and _ipp._tcp services
offered by avahi. If it finds such a service (printer)
it requests its attributes through IPP_GET_PRINTER_ATTRIBUTES
ipp request and adds it to the list of printers. Such printer
behaves like a remote printer then.
If an avahi printer is a default printer then it is considered
default by the backend only if there is no local or remote
default printer.
This functionality is enabled when building Gtk+ with CUPS 1.6
or later because it replaces browsing protocol removed in CUPS 1.6.

https://bugzilla.gnome.org/show_bug.cgi?id=688956
2013-03-04 14:30:49 +01:00
Matthias Clasen
9d36dbb44b Revert "Fix gtkprintbackendcups crash"
This reverts commit 54ffc982e9.

I've undone the GList behaviour change instead.
2013-03-01 19:13:30 -05:00
John Ralls
54ffc982e9 Fix gtkprintbackendcups crash
From trying to call g_list_delete_link with a NULL node or
removed_printer_checklist.
2013-03-01 10:14:59 -08:00
Kouhei Sutou
a9ba4488bd Add missing $(EXEEXT) for gtk-query-immodules-3.0
https://bugzilla.gnome.org/show_bug.cgi?id=692076
2013-01-20 22:24:34 -05:00
Chun-wei Fan
656ec39c29 Bug 668239 - texts disappear when notebook switch page at zh_CN locate
In gtkimcontextime.c, use gdk_win32_window_get_impl_hwnd() to get to
the impl's existing native window instead of GDK_WINDOW_HWND() which
implicitly ensures a native window for the widget itself. This seems
to work around whatever GDK problem with native subwindows and fixes
the bug.

This is based on Michael Natterer's fix for gtk-2-24.
2012-12-13 11:03:56 +08:00
Marek Kasik
6f69a0fef6 printing: Call mark_printer_active() with correct parameters
Revert the second part of the commit
6ad6f719c6. mark_printer_active()
was called without its second parameter in g_list_free_full().
2012-12-04 15:48:08 +01:00
Benjamin Berg
fd301e7847 Use the ppd groups "name" instead of "text" (bug #687065)
This commit fixes a regression caused by a patch to remove Cups 1.2
ifdefs. This resulted in the "installable options" to appear in the
print dialog.
2012-11-29 10:02:08 +01:00
Christophe Fergeau
e8659679cd Sanitize memory handling in cups_request_printer_list_cb
gtk+ was trying to display already freed strings, leaking memory,
...I noticed this because I was getting weird blinking characters
as the status of my cups printers, and valgrind confirmed something
was wrong.

https://bugzilla.gnome.org/show_bug.cgi?id=683072
2012-11-26 10:19:31 +01:00
Matthias Clasen
352c7f5120 Avoid infinite recursion in the ime input module 2012-11-19 09:30:44 -05:00
Matthias Clasen
d6809d050a XIM: Don't force random windows to become native
GDK_WINDOW_XID() has the side-effect of turning a window native;
this in turn can have unexpected effects such as black backgrounds.
Avoid this by using the XID of the toplevel.
https://bugzilla.gnome.org/show_bug.cgi?id=682395
2012-10-01 22:12:07 -04:00
Marek Kasik
be7752183e printing: Add "Custom." prefix only once to paper size
Check whether "Custom." prefix is already present in the name
of selected paper size. (#679883)
2012-09-19 18:03:41 +02:00
Adrian Johnson
dd7e8e9414 Don't rotate pdf landscape output 2012-09-12 15:38:37 +02:00
Marek Kasik
1d7ab22099 printing: Don't load custom paper sizes in file backend
Resolves #683474.
2012-09-06 14:32:31 +02:00
Chun-wei Fan
a866ed7378 gtkimcontexttime.c: Check context_ime->client_window is not NULL
Be a bit more careful in get_pango_attr_list() and
get_utf8_preedit_string() to ensure that the client_window is properly
created before proceeding, to avoid access violation/segfault crashes on
Windows with IME installed, especially when running the pickers demo.

https://bugzilla.gnome.org/show_bug.cgi?id=682919
2012-09-03 16:03:58 -04:00
Rico Tzschichholz
e8dcfad441 cups: Use IPP api when necessary with CUPS 1.6 2012-08-05 09:56:58 +02:00
Matthias Clasen
3e78324501 modules: Don't use GDK_THREADS_ENTER/LEAVE macros internally
These are just wrappers for the functions, and we want to
deprecate them. Stopping to use them internally is a good
first step. Also define GTK_COMPILATION so we can keep using
gdk_threads_enter/leave without causing deprecation warnings.
2012-07-30 18:01:47 +02:00
Matthias Clasen
01a3345c06 file printbackend: Protect a callback by GDK_THREADS_ENTER
https://bugzilla.gnome.org/show_bug.cgi?id=649569
2012-05-17 00:11:15 -04:00
Timothy Arceri
8d1f32aaaf GTK PrintToFile settings
To make setting output directory and filename simpler in the PrintToFile
dialog two gtkprintsettings have been added GTK_PRINT_SETTINGS_OUTPUT_DIR
 and GTK_PRINT_SETTINGS_OUTPUT_BASENAME.

This will reduce the code needed to implement a better name than "output.pdf"
and actually makes more sense than the existing setting
GTK_PRINT_SETTINGS_OUTPUT_URI which doesn't work seamlessly with
GTK_PRINT_SETTINGS_OUTPUT_FILE_FORMAT like the new settings do.

https://bugzilla.gnome.org/show_bug.cgi?id=657322
2012-05-14 14:26:53 +02:00
Matthias Clasen
18db64749f Fix build with --enable-debug 2012-04-30 07:07:33 -04:00
Richard Hughes
bf71b88319 Fix the colord support in GtkPrinterCups when the PPD is loaded async
If the PPD is not available when the printer is loaded then the PPD options are
not available and we can't get the correct qualifier to use with colord.

When the PPD becomes available, refresh the profile title to reflect reality.

https://bugzilla.gnome.org/show_bug.cgi?id=674890
2012-04-30 06:22:12 -04:00
John Ralls
46385aff03 Remove some more CUPS 1.2 ifdefs. 2012-04-23 12:44:06 -07:00
John Ralls
2c000c8e61 Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Fix up accesses of ipp structures in gtkcupsutils.c
2012-04-23 12:44:06 -07:00
John Ralls
02f57f9642 Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
Having refactored cups_request_printer_list_cb so that the cups
version-dependent block size is small enough to be handled in a single ifdef,
make the ifdef HAVE_CUPS_API_1_6 block.
2012-04-23 12:44:06 -07:00
John Ralls
3e354a17ef Move some variable declarations into the scopes in which they're used. 2012-04-23 12:44:06 -07:00
John Ralls
58ca84584a Extract Function cups_create_printer 2012-04-23 12:44:06 -07:00
John Ralls
d10d34e0ec Extract function cups_printer_handle_attribute 2012-04-23 12:44:06 -07:00
John Ralls
651f7b4b93 Extract printer setup variables into a struct
So that it can be passed as a single parameter to functions as we extract-function to make cups_request_printer_list_cb more manageable.

Note that not all of the affected variables are changed in this changeset. Those are in extracted functions and will be addressed in the next two changes.
2012-04-23 12:44:06 -07:00
John Ralls
4945b832b2 Create enum PrinterStateLevel
Fixes "magic number" in printer_state_reason_level.
2012-04-23 12:44:06 -07:00
John Ralls
60969ff951 Extract reasons and reasons_desc arrays to file level
So that they can be used from more than one function. Rename them to avoid naming conflicts.
2012-04-23 12:44:06 -07:00
John Ralls
bfad99ad52 Bug 670373: modules/printing/cups/gtkprintbackendcups.c won't build with CUPS 1.6
The first, simple changes. Turns off the deprecation warnings and substitutes macros and short ifdef blocks where feasible.
2012-04-23 12:44:06 -07:00
Marek Kasik
2c1839ae5f printing: Localize loaded PPD files
Use ppdLocalize() to localize strings in loaded PPD file (#674326).
2012-04-20 17:09:58 +02:00
Marek Kasik
f6e2d0947d printing: Get default number-up value from CUPS
Requests "number-up-default" attribute from CUPS and
uses its value for setting value of "gtk-n-up" option.
(#672993)
2012-04-20 17:04:58 +02:00
Alexander Larsson
5d9ab2621d win32: Remove the ms-windows engine
This is not used for the windows theme anymore, and is in fact completely
useless. The code is still in git if anyone wants to look at it.
2012-04-03 19:34:02 +02:00
Javier Jardón
80d54b4533 build: require cups >= 1.2
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=672182
2012-03-19 00:10:14 +00:00
Alexander Larsson
aae60af8a3 Unbreak win32 build
Commit de62a1096 broke win32 as it removed the HAVE_X11R6 checks for
building xim, but did not replace them with USE_X11. This made
it try to build xim on non-X targets.
2012-03-16 10:34:11 +01:00
Marek Kasik
abf1c57bd0 printing: Increase reference count for user data
Increase reference count for data passed to colord's callbacks (#671419).
2012-03-12 12:36:50 +01:00
Matthias Clasen
de62a1096b Drop support for pre-R6 X
X11 R6 was released in 1995 - time to let go.
2012-03-10 23:27:21 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Marek Kasik
9afe13bf91 printing: Don't crash when printing
This commit fixes crash which occurs in Firefox, Thunderbird and Inkscape
during printing. This crash was caused because of wrong handling of Custom
CUPS options. (#543520)
2012-01-31 12:15:43 +01:00
Matthias Clasen
585a6652d5 Use G_SOURCE_CONTINUE/REMOVE
Now that GLib provides these macros, we should use them
to make the code more readable.
2012-01-30 19:12:27 -05:00
Marek Kasik
e0d32d9456 printing: Fix a typo
Fix a typo which crashes on my printer.
2012-01-26 10:52:47 +01:00
Benjamin Berg
27f3c3c031 Strip "Custom." prefix when getting default options from cups. 2012-01-17 20:33:32 +01:00
Benjamin Berg
6fa6576dda Set cups Custom print options correctly (bug #543520, patch by Marek Kašík)
This patch fixes the cups print backend to pass Custom options with
the "Custom." prefix to cups if neccessary.
2012-01-06 00:20:42 +01:00
Javier Jardón
6ad6f719c6 modules/*: Use g_list_free_full() convenience function 2012-01-05 04:22:43 +01:00
Matthias Clasen
ebd28de588 XIM: gracefully deal with non-X backends
Patch by Young-Ho Cha, bug 660309.
2011-12-29 23:43:51 -05:00
Jan Rękorajski
f807f7834f print dialog: Fix authentication logic
Reset state of CUPS requests correctly during authentization and
check CUPS requests for errors.
Don't initialize variables holding password and username with empty
string (#664640).
2011-12-14 14:09:48 +01:00
Dieter Verfaillie
af00c68dd0 win32: correctly handle difference between tab_pos and gap_side when drawing an extension (notebook tab) 2011-11-10 17:40:57 +01:00
Dieter Verfaillie
2d83850864 win32: add TODO mentioning GtkButton::child-displacement-x & y should be 0 when XP theme is active 2011-11-10 17:40:56 +01:00
Arnaud Charlet
6ed89c514b win32: fix typo in msw_style.c
https://bugzilla.gnome.org/show_bug.cgi?id=647460
2011-11-10 17:40:56 +01:00
Matthias Clasen
484a45c4b6 Drop DISABLE_DEPRECATED guards here, too 2011-11-01 23:22:06 -04:00
Benjamin Berg
94782e914c Fix polling for new data in cups print backend (bug #599664) 2011-08-06 10:37:21 +02:00
Javier Jardón
32e00d1f43 Use AM_CPPFLAGS instead the obsolete INCLUDES 2011-07-06 15:58:32 +01:00
Benjamin Otte
df2e122b5c gail: Move from modules/other/gail to gtk/a11y 2011-07-05 16:07:56 -04:00
Benjamin Otte
3ec9e6c5e8 gail: No need to include modules/other in CFLAGS anymore
Now that we include headers directly, ew don't need it anymore. And the
current directory is included automatically.
2011-07-05 16:07:56 -04:00
Benjamin Otte
ee606d1684 gail: Include files directly
Instead of including <gail/gailfoo.h>, include "gailfoo.h"
Private headers should be included like this (to make it esily visible
that the headers are private) and we want to move this directory to a
different name, so hardcoding the directory name is counterproductive to
that.
2011-07-05 16:07:56 -04:00
Javier Jardón
7c0e18f8a6 gailtextcell: Fix typo 2011-06-12 21:46:18 +01:00
Benjamin Otte
0bfb663d0c cups: Fix unused variable warning when not using colord 2011-06-10 15:01:04 +02:00
Richard Hughes
9bff51e538 Add optional colord support to the CUPS print module
This functionality adds a new 'Printer Profile' entry to the 'Color' page in the
UNIX print dialog if colord support is enabled.

This shows the user what color profile will be used for the settings they have
selected, and if no profile or the default profile is going to be used.

We are deliberately not allowing the user to _change_ the selected profile, as
the ICC profile is an implementation detail, and we should not change the other
print settings based on the characterization state.

The OpenICC group broadly recommend showing the profile that is used, so that
power users can be sure the correct profile is being used at the right time.

Normal users won't care, as they don't know how horrible the color match is
without profiling the printer and media.
2011-06-09 18:31:02 +01:00
Benjamin Otte
2fd625d191 gail: Fix for new box handling 2011-06-09 06:18:10 +02:00
Benjamin Otte
acaaca4c76 gail: Fix scrollbar index_in_parent() implementation 2011-06-09 06:16:23 +02:00
Benjamin Otte
dee2e74736 gail: Remove unreachable code 2011-06-09 06:00:34 +02:00
Matthias Clasen
3e066e893e Use buttonboxes instead of hbuttonboxes 2011-06-07 22:03:19 -04:00
Matthias Clasen
f32d243bb0 Use boxes instead of hboxes 2011-06-07 19:56:12 -04:00
Matthias Clasen
611b0767c0 Use boxes instead of vboxes 2011-06-07 18:38:46 -04:00
Javier Jardón
02285b232c gail: Use GdkRGBA instead GdkColor 2011-06-07 17:42:24 +01:00