Commit Graph

30049 Commits

Author SHA1 Message Date
Christoph Reiter
8ad81a35e1 gtk_init: Fix debug flags handling when a display is already open
The code assigning the display to the debug_flags struct gets only
called when the default display changes, which never happens
when there already is one.

This makes it call the change callback in case a display is already
there.

The same fix was applied to gtk3 in !26 where calling gdk_init()
before gtk_init() would trigger this case. With gdk_init() gone
in master this is less likely to happen, but still possible
if gdk_display_open() is called before gtk_init().

See https://gitlab.gnome.org/GNOME/pygobject/issues/166
2018-02-19 19:24:00 +01:00
Matthias Clasen
9ea80a7506 Remove some unused code
No more callers of _gtk_find_module.
2018-02-18 22:13:38 -05:00
Matthias Clasen
de0039546b Convert print backends to use a GIOExtensionPoint
Use GIOModule and GIOExtensionPoint. This is the preferred
way to define extensions these days, instead of manually
implementing type modules.
2018-02-18 18:00:42 -05:00
Matthias Clasen
7272610a02 Move the mixed module check function
This is only called in one place, move the function there.
2018-02-18 09:41:29 -05:00
Matthias Clasen
5b4082ac87 Remove gtkmodules.h
We don't use these definitions anymore.

Also clean up the docs wrt to modules.
2018-02-18 09:41:29 -05:00
Matthias Clasen
39d1537211 Stop loading modules
We no longer look at the GTK_MODULES environment variables.
With this commit, we stop loading general-purpose modules
altogether.
2018-02-18 09:41:29 -05:00
Matthias Clasen
a732ebf521 Stop using settings for modules
The Wayland backend was already not supporting this setting
since it is an XSetting that is not backed by a GSetting.

Drop this setting altogether, since we will stop supporting
general-purpose modules.
2018-02-18 09:41:29 -05:00
Christoph Reiter
fef3dfc43e Merge branch 'master' into 'master'
Fix annotation for gtk_tree_view_is_blank_at_pos()

See merge request GNOME/gtk!13
2018-02-18 10:48:23 +00:00
Daniel Boles
db4895fbe5 TextLayout: Clarify implementation of special case
This exists to exit early for invisible lines. It attempts to use the
LineDisplay’s direction to create a corresponding PangoLayout. However,
the dir is not yet set by this point, & the display was new0()d, so its
dir is always 0 == TEXT_DIR_NONE. Thus, we always create an LTR layout.

Whatever the original intent, this outcome seems to be OK, so let’s make
the code say what it means, rather than using a misleading conditional.

https://bugzilla.gnome.org/show_bug.cgi?id=779099
2018-02-17 22:18:13 -05:00
Matthias Clasen
f42ebef9d1 calendar: Avoid warnings for new "%OB" format
Use the same code we have in gtk-3-22 to deal with strftime()
not supporting %OB, and avoid compiler warnings for non-literal
format strings.
2018-02-17 17:12:45 -05:00
Benjamin Otte
95ddb57562 cssimage: Get rid of draw vfunc
All remaining users of that vfunc now implement snapshot using cairo
render nodes (win32 and radial).

Also, GtkCssImageClass.snapshot is now NULL, so if a subclass doesn't
implement it, it will now crash.
Previously it would try to call the draw vfunc.
2018-02-17 08:04:43 +01:00
Timm Bäder
1b8a768279 adwaita: Move searchbar style to box child
This way, we avoid a 1px border at the bottom of the actual searchbar
widget and move it instead to the child of a GtkRevealer. Since we can
now use widgets with 0px height, we finally get rid of the 1px border
that was drawn even if the searchbar child was hidden.
2018-02-16 21:23:14 +01:00
Carlos Garnacho
f64c32113a gtksettings: Remove leftover code
The immodule variable is unused
2018-02-16 19:36:40 +01:00
Timm Bäder
78c6f713dd textview: Implement measure()
Don't use the current layout size as minimum size anymore, that doesn't
make sense. Also move the code from size_request() from gtk2 into the
now current measure() function.
2018-02-16 17:41:41 +01:00
Bastien Nocera
cc951ac6c8 gtkbookmarksmanager: Use GTK+ 3.0's bookmarks file
There's no reason to use a separate file until the format of the file
changes though, as this just means that GTK+ 3.x and GTK+ 4.x
applications would end up showing different bookmarks in the file
chooser.

https://bugzilla.gnome.org/show_bug.cgi?id=793425
2018-02-15 20:42:21 +01:00
Carlos Soriano
6cef9514ae gtkplacessidebar: Rename favorites to starred
To have more consistency in the name. The same was done in Nautilus in
commit 27b039b37c.
2018-02-15 10:51:04 +01:00
Matthias Clasen
d564e397e2 Merge branch 'master' into 'master'
calendar: Use the new "%OB" format in strftime()

Closes #9

See merge request GNOME/gtk!10
2018-02-15 03:07:54 +00:00
Matthias Clasen
c2531b7ff2 Merge branch 'wip/carlosg/imwayland' into 'master'
modules: Add wayland IM implementation

See merge request GNOME/gtk!4
2018-02-15 03:01:43 +00:00
Gniourf
c5bece5cef Fix annotation for gtk_tree_view_is_blank_at_pos()
The annotation (allow-none) is wrong. Since
gtk_tree_view_is_blank_at_pos() also calls
gtk_tree_view_get_path_at_pos(), the same fields should have the same
annotations.
2018-02-14 13:51:00 +01:00
Rafal Luzynski
b9ea25c25c calendar: Use the new "%OB" format in strftime()
Due to the recent changes introduced in glibc 2.27 "%OB" is the
correct format to obtain a month name as used in the calendar
header.  The same rule has been working in BSD family (including
OS X) since 1990s.  This change is simple but makes GTK+ 4.x require
glibc >= 2.27.  If this requirement cannot be fulfilled then we must
cherry-pick the full commit cbf118c from gtk-3-22 branch.

Closes: #9
2018-02-13 23:29:20 +01:00
Timm Bäder
aa32fc1708 cssprovider: Remove priv pointer 2018-02-13 18:48:44 +01:00
Timm Bäder
160a4208ed menu: Remove an incorrect comment
They are not missing, they are snapshot when chaining up.
2018-02-13 18:48:44 +01:00
Carlos Garnacho
21e9fe4f55 modules: Add wayland IM implementation
This IM context implementation goes through the gtk-text-input protocol,
leaving up to the compositor the actual interaction with IM engines.
2018-02-13 15:47:57 +01:00
Benjamin Otte
91c6b56c99 treemenu: Remove unused defines 2018-02-13 10:34:06 +01:00
Emmanuele Bassi
bb7beb5ade Drop method annotation for gtk_drag_cancel()
The other method annotations were removed in commit c306e448b3.

There is no introspected ABI change, as g-ir-scanner would just ignore
the annotation.

This eliminates the last warning when building GTK on Linux.
2018-02-12 16:46:42 +00:00
Emmanuele Bassi
032dabe137 build: Allow using introspection from subprojects
When building dependencies as subprojects we need to tell the
introspection scanner where to find the introspection data; this
means using GIR targets from the subproject.
2018-02-12 14:25:43 +00:00
Alban Browaeys
c306e448b3 Fix overzalous method annotations for drag and drop
Functional revert of commit 9c4892f291.

Fixes introspection scanner warnings like:

  Warning: Gtk: gtk_drag_finish: Methods must belong to the same
  namespace as the class they belong to

That is, the gtk_drag_* functions cannot be methods as they have a
"GdkDragContext" as the instance parameter, and that is not a valid
type for the Gtk namespace.

This is not an introspected ABI change, as the generated introspection
data ignores the annotation.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=692152
2018-02-12 11:42:44 +00:00
Emmanuele Bassi
55c9576d83 build: Use GIR targets for built introspection data
Instead of using `--include-uninstalled` in the scanner arguments, we
can tell Meson to use an introspection target, and it'll do the
appropriate thing for us.
2018-02-12 11:42:44 +00:00
Timm Bäder
d54321c1ca menu: Guard against NULL toplevel
This can happen, as indicated by GtkMenu explicitly connecting to
::destroy of its toplevel window. Do the same thing in GtkComboBox.
2018-02-09 20:17:48 +01:00
Timm Bäder
1362609120 box: Remove an unnecessary include 2018-02-09 11:36:53 +01:00
Timm Bäder
89ac1d6197 box: Rename private pointers to "priv"
Which is the style we use everywhere else.
2018-02-09 11:36:53 +01:00
Timm Bäder
1cfbe9c3d0 box: Simplify size_allocate
Stop looking at the box allocation position since both x and y are 0.
2018-02-09 11:36:53 +01:00
Timm Bäder
3a4c6c18b3 box: Use widget child list when computing size request
Contrary to what the comments in this function might suggest, it does
not actually do anything about child positions, child child sizes. So,
packing doesn't matter and we don't need to iterate over all child
widgets twice.
2018-02-09 11:36:53 +01:00
Timm Bäder
5e9f5c17b5 box: Use widget child list in compute_size_for_orientation
And remove the non-NULL checks for minimum_size and natural_size since
these are non-NULL by definition since this function is only called from
measure().
2018-02-09 11:36:53 +01:00
Benjamin Otte
ff5928754f inspector: Remove gtk.h include 2018-02-09 01:06:59 +01:00
Benjamin Otte
396056e011 a11y: Remove gtk.h include from iconview header 2018-02-09 01:02:06 +01:00
Benjamin Otte
619a19f6fd a11y: Remove gtk.h include from lockbutton 2018-02-09 00:58:59 +01:00
Benjamin Otte
808921dd3e a11y: Remove gtk/h include from menu header 2018-02-09 00:56:26 +01:00
Benjamin Otte
6a47dc26e4 a11y: Remove gtk.h include from listbox headers 2018-02-09 00:52:44 +01:00
Benjamin Otte
df68ef8553 a11y: Remove gtk.h from flowbox includes 2018-02-09 00:47:58 +01:00
Benjamin Otte
3bb95a09bb a11y: Remove gtk.h include from container accessible 2018-02-09 00:42:38 +01:00
Benjamin Otte
9c7874214e a11y: Remove gtk.h include 2018-02-08 23:39:17 +01:00
Benjamin Otte
f08bc40fbb a11y: Don't include gtk.h
Also add missing includes and sort them for all the widgets that relied
on that before.
2018-02-08 15:25:53 +01:00
Benjamin Otte
7437d34eb9 shortcuts: Don't include gtk.h
Clean up all shortcuts includes to only include the necessary files
while we're at it.
2018-02-08 06:16:01 +01:00
Benjamin Otte
eb3049d6b5 pointerfocus: Don't include gtk.h
Also fix up gtktypes.h to include the required glib.h for G_BEGIN_DECLS
and gtkdnd.c to include missing includes.
2018-02-08 06:16:01 +01:00
Timm Bäder
4f50c68296 cellrendereraccel: unref sizing_label 2018-02-06 13:40:57 +01:00
Timm Bäder
c73e22dadb notebook: Remove another event type check
Just like 3d65019e98, but for release
events.
2018-02-06 09:19:40 +01:00
Timm Bäder
de6c0037b7 separatormenuitem: Don't create label widget in get_label
Calling gtk_menu_item_get_label on a GtkSeparatorMenuItem would
otherwise create a GtkLabel child, increasing the vertical size request
to that of the child label.
2018-02-06 09:19:40 +01:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Benjamin Otte
452f2f0394 cssprovider: Use g_file_load_bytes()
This way, we get a special no-copy case for resources.

https://bugzilla.gnome.org/show_bug.cgi?id=790270
2018-02-05 17:22:56 +01:00