| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
printer_name_compressed_strv is NULL-terminated array
of gchar*, which means N+1 memory should be allocated.
Otherwise, if the printer name has no empty components
(which is usually the case), printer_name_compressed_strv[N],
which should contain the NULL sentinel, will actually lie
just outside of allocated memory, which is UB.
In my case, it led to crashes inside g_strjoinv
when Print... dialog is opened in evince.
#0 0x00007fad2ce1bad7 in __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:96
#1 0x00007fad2d04d88d in g_strjoinv (separator=separator@entry=0x7fad0c9bc508 "-", str_array=str_array@entry=0x556b017f0200) at ../glib-2.60.7/glib/gstrfuncs.c:2585
#2 0x00007fad0c9b8a89 in avahi_service_resolver_cb (source_object=<optimized out>, res=<optimized out>, user_data=0x7fad08020ee0) at /var/tmp/portage/x11-libs/gtk+-3.24.13/work/gtk+-3.24.13/modules/printbackends/cups/gtkprintbackendcups.c:3223
#3 0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8b00 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
#4 0x00007fad2d1f987d in g_task_return (task=0x556b017a8b00 [GTask], type=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1278
#5 0x00007fad2d1f9dec in g_task_return (type=G_TASK_RETURN_SUCCESS, task=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1678
#6 0x00007fad2d1f9dec in g_task_return_pointer (task=<optimized out>, result=<optimized out>, result_destroy=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1683
#7 0x00007fad2d24b6af in g_dbus_connection_call_done (source=<optimized out>, result=0x556b017a8bc0, user_data=0x556b017a8b00) at ../glib-2.60.7/gio/gdbusconnection.c:5747
#8 0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8bc0 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
#9 0x00007fad2d1f8f09 in complete_in_idle_cb (task=0x556b017a8bc0) at ../glib-2.60.7/gio/gtask.c:1223
#10 0x00007fad2d02d2c0 in g_main_dispatch (context=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3189
#11 0x00007fad2d02d2c0 in g_main_context_dispatch (context=context@entry=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3854
#12 0x00007fad2d02d658 in g_main_context_iterate (context=context@entry=0x556b00eee090, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.60.7/glib/gmain.c:3927
#13 0x00007fad2d02d6df in g_main_context_iteration (context=context@entry=0x556b00eee090, may_block=may_block@entry=1) at ../glib-2.60.7/glib/gmain.c:3988
#14 0x00007fad2d22248d in g_application_run (application=0x556b0116f130 [EvApplication], argc=<optimized out>, argv=<optimized out>) at ../glib-2.60.7/gio/gapplication.c:2519
#15 0x0000556b002e55a1 in ()
#16 0x00007fad2ccd6f1b in __libc_start_main (main=0x556b002e50d0, argc=2, argv=0x7ffe1057fa88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe1057fa78) at ../csu/libc-start.c:308
#17 0x0000556b002e567a in ()
(gdb) p printer_name_compressed_strv[0]
$4 = (gchar *) 0x556d4a4be430 "Brother"
(gdb) p printer_name_compressed_strv[1]
$5 = (gchar *) 0x7f9dbc011090 "MFC"
(gdb) p printer_name_compressed_strv[2]
$6 = (gchar *) 0x556d4a51ba50 "7860DW"
(gdb) p printer_name_compressed_strv[3]
$7 = (gchar *) 0x401 <error: Cannot access memory at address 0x401>
|
| |
|
|
|
|
|
|
| |
Device URI was not filled for non-Avahi printers by my previous commit.
I've added it back. It was a mistake during rebasing of the patch
to current master.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create printer name from name of the advertised service
for standalone IPP printers as opposed to CUPS printers
advertised via Avahi which get name from their
resource path.
This is similar to what cups-filters does.
Pass GtkPrinter class to request for printer info
so that it does not need to be searched for
(such search could fail for standalone IPP printers).
https://gitlab.gnome.org/GNOME/gtk/issues/1509
|
|
|
|
|
|
|
|
|
| |
Set reasonable default values for printers discovered
by Avahi which do not have 'printer-type' attribute.
This is the case for network printers which were not
published by CUPS.
Related to the issue #1509.
|
|
|
|
|
| |
Try to get PPD from original host if there is no PPD for remote printer
on current CUPS server.
|
|
|
|
|
|
|
|
|
|
|
| |
We were looking for the cups headers and the cups lib in the default locations
which for example breaks with OpenBSD where the cups headers are under /usr/local/include/
Instead just use the "cups" dependency type from meson which internally uses cups-config.
See #1967
Ported to master from !963
|
|
|
|
|
|
|
|
| |
httpGetAuthString() was added with cups 1.3 and we depend on a newer version
now. The direct field access was a fallback in case httpGetAuthString()
was missing, so this can also be dropped.
Ported to master from !938
|
|
|
|
| |
Follow the naming convention for private headers.
|
|
|
|
|
| |
Name this header gtkprinterprivate.h, following
our convention for private headers.
|
|
|
|
|
| |
Drop support for versions of CUPS < 2.0, to simplify the backend code
and drop a lot of conditional blocks.
|
|
|
|
|
|
|
| |
The http* family of functions was deprecated after CUPS 1.7. We can
conditionally use it when built against a newer version of CUPS. The
additional parameters are taken directly from the fallback values
inside CUPS itself.
|
|
|
|
|
| |
We support CUPS ≥ 1.2, but we use API that was introduced and deprecated
at a later point.
|
|
|
|
|
|
|
|
|
|
|
| |
Additional code improvements and fixes:
- Use g_regex_match_simple() instead of sscanf()
- Added spaces between function names and left parantheses
- Set always correct custom page size
- Added page_setup field to CupsOptionsData data structure
- Replaced tab indentions by spaces
- Moved #define out of add_cups_options() function, removed line breaks from regular expressions
|
|\
| |
| |
| |
| | |
GTK+ 4: Improve Windows/Visual Studio build experience
See merge request GNOME/gtk!185
|
| |
| |
| |
| |
| |
| | |
We need to override _GLIB_EXTERN to export the required symbols for the
GIO module on Visual Studio, so that the media modules can be
successfully loaded.
|
| |
| |
| |
| | |
Use 'GTK' consistently.
|
|/
|
|
|
| |
I wonder who forgot that.
Whoops.
|
|
|
|
|
|
|
|
|
| |
We were leaking the GBytes for the image memory, which is a
noticeable memleak to anyone who's casually running a memory monitor.
Go KDE users!
Closes #1200
|
|
|
|
| |
If no file is open, refuse to play.
|
|
|
|
|
| |
4.0 will represent a clean epoch. We don't want to have
lots of noise in the docs about 2.x or 3.x.
|
| |
|
|
|
|
|
|
|
|
| |
to retreive paper size specific hard margins and use this
to set the hard margins in the print context.
(modified by Marek Kasik <mkasik@redhat.com>)
https://bugzilla.gnome.org/show_bug.cgi?id=686109
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using strncpy() with a buffer we need to account for the
terminating NUL character. GCC 8 started warning when using PPD_MAX_NAME
as the buffer length for strncpy() because the buffer we're copying into
has the same length — which means that the terminating NUL may be
skipped if the source string has a length of PPD_MAX_NAME.
The appropriate way to handle the case where we're copying a source with
a length bigger than of PPD_MAX_NAME is, as reported in the strncpy()
documentation, to copy `PPD_MAX_NAME - 1` bytes, and explicitly NUL
terminate the destination buffer. This has the additional benefit of
avoiding the compiler warning.
|
| |
|
|
|
|
| |
Also, use it where appropriate.
|
|
|
|
|
|
|
|
| |
The main buildscript expects 'print_backends' list to be defined.
Since printbackends is os_unix-only, we need to define this list
ourselves for other OSes.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
|
| |
|
|
|
|
| |
This adds a module using ffmpeg to implement the GtkMediaFile interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way, we can support external libraries providing implementations of
GtkMediaFile.
We also add a media backend called 'nomedia' that can be enabled to not
compile any support for GtkMediaFile. This is useful when people want to
statically compile GTK into an application that does not use media.
For now, this option is the default.
We also support a new environment variable GTK_MEDIA that allows
selecting the implementation to use.
GTK_MEDIA=help can be used to get info about the available
implementations.
|
|
|
|
| |
There's no "auto" option anymore, so remove checks for that option.
|
|
|
|
|
| |
All the print backend shared modules should use the same C preprocessor
symbols.
|
|
|
|
|
| |
This will let us use GTK_PATH to load them uninstalled, which
is useful for in-tree tests.
|
|
|
|
|
| |
No need to load these as gio modules, we just include
them in libgtk.
|
|
|
|
|
|
|
|
|
|
|
| |
Add an extension point called gtk-im-module, which requires
the type GtkIMContext. Simplify the loading by using GIO
infrastructure. Drop the locale filtering for now, I don't
think it is really necessary nowadays.
Convert existing platform modules to gio modules.
Sill to do: Drop the conditional build machinery.
Either always include them, or never.
|
|
|
|
|
| |
The variable is a leftover from when we were not using the
G_DEFINE_DYNAMIC_TYPE macro.
|
|
|
|
| |
Typos and re-declared functions.
|
|
|
|
|
| |
Some copy-and-paste from the CUPS print backend broke the build on
Continuous, where CUPS does not exist.
|
|
|
|
| |
The enabled print backends are a boolean, not a 'yes/no' string.
|
| |
|
|
|
|
|
|
| |
Use GIOModule and GIOExtensionPoint. This is the preferred
way to define extensions these days, instead of manually
implementing type modules.
|
|
|
|
|
| |
(cherry picked from commit 7461ceebe34bfc6f882145e89e1ba2f187d08303)
(cherry picked from commit d2a4febfa75182d36ffd48eb05e9054e8bf9cf53)
|
|
|
|
|
| |
The papi and test printbackends have not seen any
maintenance in a long time.
|
|
|
|
| |
This was a mis-merge.
|
|
|
|
|
| |
These are not well integrated, and have not seen any
maintenance in many years.
|
|\
| |
| |
| |
| | |
modules: Add wayland IM implementation
See merge request GNOME/gtk!4
|
| |
| |
| |
| |
| | |
This IM context implementation goes through the gtk-text-input protocol,
leaving up to the compositor the actual interaction with IM engines.
|
| |
| |
| |
| |
| |
| | |
Instead of having separate options for each print backend, we can use
the same approach as the input method modules: a single option, with a
comma-separated list of print backends.
|
| |
| |
| |
| |
| | |
Drop the 'enable-' prefix, to follow the naming best practices for Meson
configuration options.
|
| |
| |
| |
| |
| |
| | |
We can call it 'included-immodules', and simplify its logic by always
attempting to split the value, to avoid turning an array into a string
and then back into an array again.
|