Commit Graph

49814 Commits

Author SHA1 Message Date
Matthias Clasen
d60cd1f49f font chooser: Add font features
Populate the tweak page with OpenType font features.
2018-05-18 09:31:15 +01:00
Matthias Clasen
b57e10ad60 font chooser: Add a tweak page 2018-05-18 09:31:15 +01:00
Matthias Clasen
cc35a35752 font chooser: introduce font chooser levels
This is a more systematic approach to reducing the
level of detail in the font chooser.
2018-05-18 09:31:15 +01:00
Matthias Clasen
90c9a4ba05 Bump the pango requirement
We want to use the new font variation api in pango 1.41.
2018-05-18 09:31:15 +01:00
Matthias Clasen
2f58c7c060 Add a flatpak manifest for widget-factory
This makes it easier to build GTK+.
2018-05-17 19:28:28 +01:00
Matthias Clasen
08f31f8f4a Merge branch '1053-scroll-cursor-gets-left-behind-if-a-child-widget-steals-the-scroll' into 'gtk-3-22'
Resolve "Scroll cursor gets left behind if a child widget steals the scroll"

See merge request GNOME/gtk!134
2018-05-17 15:19:49 +00:00
Matthias Clasen
f2868f5cf3 textview: Don't scroll for pastes in another view
GtkTextView scrolls to the insertion point when the text
buffer signals a paste is done. This is wrong when there
are multiple views on the same buffer, and the paste
happened in another view.

To fix this, flip the handling of the scroll_after_paste
boolean to only be TRUE if we know that we want to scroll.
2018-05-17 11:06:46 +01:00
Benjamin Otte
0caa3dbccf Merge branch '1069-thread-1-glade-received-signal-sigfpe-arithmetic-exception' into 'gtk-3-22'
Resolve "Thread 1 "glade" received signal SIGFPE, Arithmetic exception."

See merge request GNOME/gtk!151
2018-05-16 12:48:46 +00:00
Mohammed Sadiq
d219596212 appchooserdialog: Fix memory leak 2018-05-13 14:51:00 +01:00
Mohammed Sadiq
26b6071db8 appchooserdialog: Don't fire notify::heading twice
The gtk_app_chooser_dialog_set_heading() function do emit
notify::heading. Since the setter simply calls the function,
the setter itself shouldn't emit a notify signal by itself.
2018-05-13 14:51:00 +01:00
Mohammed Sadiq
7886c645c4 textview: Always show select-all button in touch popup
"Select all" action is possible regardless of the text selection state
or if the text is editable or not.
2018-05-13 14:51:00 +01:00
Mohammed Sadiq
a8363a9887 textview: Simplify creating bubble action buttons
Buttons can be created simply with gtk_button_new_from_icon_name().
2018-05-13 14:51:00 +01:00
Juan Pablo Ugarte
87aed887be GtkBox: do not divide by zero on gtk_box_size_allocate_with_center()
https://gitlab.gnome.org/GNOME/gtk/issues/1069
2018-05-12 11:06:37 -03:00
Chun-wei Fan
0dde06124e Visual Studio 2008 builds: Generate gtk/gtktypefuncs.c
This is the updates to the Visual Studio 2008 projects to generate
gtk/gtktypefuncs.c using the preprocessor and the gentypefuncs.py that
was adapted from master.

Unfortunately we could not clean up the projects as we did for the 201x
ones due to the differences in project file format.
2018-05-12 11:03:55 +08:00
Chun-wei Fan
1d02739992 Visual Studio 201x builds: Clean up project files
Combine repetitive parts, and unify using $(PythonDir) for all builds,
which the paths set in the property sheets are now based on the Visual
Studio version and platform combination.
2018-05-12 10:52:47 +08:00
Chun-wei Fan
a8262c7581 Visual Studio 201x builds: Fix previous commit
Not that it will make a difference, but to be consistent with the
autotools builds.  Include gtkx.h instead of gtk.h when we generate the
source to feed to the preprocessor.
2018-05-12 10:24:59 +08:00
Chun-wei Fan
1517acee55 Visual Studio 201x builds: Generate gtk/gtktypefuncs.c
We now need to generate gtktypefuncs.c by ourselves, so modify the
gentypefuncs.py script from master, and add a custom build step in the
projects to generate gtktypefuncs.c.  The custom build step for the 2008
projects will be added later.
2018-05-12 01:15:33 +08:00
Matthias Clasen
7b3129ad4f Merge branch 'wip/restart-cursor-animation-gtk-3' into 'gtk-3-22'
wayland: Fix restarting cursor animation

See merge request GNOME/gtk!150
2018-05-11 15:24:55 +00:00
Chun-wei Fan
95e6a0650b gtk/Makefile.am: Fix Visual Studio project generation
We now need the generated sources to be included explicitly in the list
so that they get listed in the project files to be built.
2018-05-11 18:05:46 +08:00
Jonas Ådahl
7edd465f6d wayland: Fix restarting cursor animation
When an animated cursor was set and the previous cursor animation delay
happened to be the same, we wouldn't restart the animation timeout and
just return G_SOURCE_CONTINUE assuming the timer would continue. This
assumption is however only valid if the function was called from the
timeout, which is not the case.

Instead also arm the timer also if there is no previous timer active.
2018-05-09 22:13:10 +02:00
John Ralls
828f634d5c [Quartz] Hardcode screen resolution for text at 96.0.
It seems that CoreText is internally calibrated for this, see
https://bugzilla.gnome.org/show_bug.cgi?id=787867 for a detailed
discussion.
2018-05-08 17:58:00 -07:00
Benjamin Otte
85fa6ba631 gtk: Fix reserved pointers
So gcc stops complaining about unnecessary parenthesis.

Closes #1059
2018-05-07 22:02:56 +02:00
Björn Lindqvist
893fc1dec4 Range: Bin pointless check before emitting signal
In scroll_event(), there is no need to check whether we are realized
before emitting ::change-value, as we must be when receiving an event.

Git-formatted/rebased/cleaned up by Daniel Boles <dboles.src@gmail.com>

Close https://gitlab.gnome.org/GNOME/gtk/issues/292
2018-05-06 19:58:15 +01:00
Daniel Boles
96774e8b5c Menu: cleanups for previous commit and nearby
• #include <math.h> for the new uses of floor()
• Move the new ints and popdown_data into the scopes where they are used
• Don’t pointlessly init other ints to 0 as they always get reassigned
• Burninate gint
2018-05-06 11:49:11 +01:00
Sam Douglas
f443dbe8c1 Menu: Fix broken navigation triangle/hysteresis
This issue was caused when mouse coordinates were changed to floating
point values in commit e8b38fedbd.

This patch floors the event->x_root and event->y_root values when
setting the navigation region, so the previous behaviour is restored.

https://gitlab.gnome.org/GNOME/gtk/issues/450
2018-05-06 11:49:01 +01:00
Daniel Boles
133e8fc03f ScrolledWindow: Unset cursor if child takes scroll
https://gitlab.gnome.org/GNOME/gtk/issues/1053
2018-05-05 11:45:43 +01:00
Benjamin Otte
2ce63a86ba x11: Set a transparent background on windows by default
This avoids black flicker on compositing WMs when a window is first shown.
2018-05-04 13:46:46 +02:00
Matthias Clasen
609cb85f3a emoji chooser: Match search terms better
Use g_str_match_string for better results.

cherry-pick of be2853e5de

https://gitlab.gnome.org/GNOME/gtk/issues/898
2018-05-04 09:45:44 +01:00
Matthias Clasen
cb56bbe430 Merge branch 'wip/lantw/gtk3-use-dev-evdev-input-h-on-freebsd' into 'gtk-3-22'
wayland: Use dev/evdev/input.h on FreeBSD (GTK3)

See merge request GNOME/gtk!132
2018-05-02 10:56:25 +00:00
Jiri Grönroos
8fc72c902d Update Finnish translation 2018-05-01 19:47:02 +00:00
Ting-Wei Lan
a9f0704ae1 wayland: Use dev/evdev/input.h on FreeBSD
The header linux/input.h used by GDK is specific to Linux. It is
possible to get a few Linux headers on FreeBSD by installing v4l_compat,
but it is usually better to use the one shipped with FreeBSD.

We prefer dev/evdev/input.h to linux/input.h here, so it will always use
dev/evdev/input.h on FreeBSD regardless of v4l_compat.

https://svnweb.freebsd.org/changeset/ports/465644
2018-05-01 22:00:31 +08:00
Benjamin Otte
33bec5a4fb Merge branch '169-gtktextview-accesses-already-disposed-object-3-22' into 'gtk-3-22'
Resolve "GtkTextView accesses already disposed object" in 3.22

See merge request GNOME/gtk!110
2018-04-30 11:57:14 +00:00
Benjamin Otte
279d7bb2f5 Merge branch 'window-activate-grab-3-3' into 'gtk-3-22'
gdk: do not deactivate window on keyboard grabs

See merge request GNOME/gtk!127
2018-04-30 09:55:45 +00:00
Samuel Thibault
c926b28d96 gdk: do not deactivate surface on keyboard grabs
When pressing e.g. a window manager shortcut, which acquires keyboard grab,
Xorg would send FocusOut NotifyGrab then FocusIn NotifyUngrab.  Currently
gdk would then deactivate the current surface, which makes accessibility
screen readers think that we have switched to a non-accessible application
and came back again, and thus reannounce the application frame etc. which we
don't want when e.g. just raising volume.

And actually, receiving FocusOut NotifyGrab does not mean losing the
X focus, it only means an application aqcuired a grab, i.e. it is
temporarily stealing keyboard events. On Wayland, this isn't even
notified actually.

This commit makes gdk only deactivate surfaces when there was an actual
focus switch to another window, as determined by has_focus_window (instead
of just has_focus), which happens either normally through FocusOut with
NotifyNormal, or during grabs through FocusOut with NotifyWhileGrabbed.

Fixes #85

(cherry picked from commit 01455399e8)
2018-04-30 11:17:34 +02:00
Руслан Ижбулатов
ff47cb0c51 gtkselection: ensure W32 functions used only for W32 displays (v2)
Another instance of a check needed for gdk_win32_selection_add_targets().
2018-04-26 19:46:24 +00:00
Руслан Ижбулатов
b9bb63b1ab gtkselection: ensure W32 functions used only for W32 displays
gdk_win32_selection_add_targets() is for W32 displays only.
2018-04-26 19:36:27 +00:00
Руслан Ижбулатов
9ca3bacddf imcontextsimple: ensure W32 code only runs on W32 displays
gdk_win32_keymap_check_compose() shouldn't be called for
non-W32 displays (i.e. when using broadway or other backends
that could be made to run on Windows).
2018-04-26 17:42:49 +00:00
Benjamin Otte
f5482e6954 fishbowl: Port version from GTK 4
This version also merges widgetbowl into fishbowl.
2018-04-26 00:32:44 +02:00
Adrian Johnson
fff08fa319 Add _gtk_printer_get_hard_margins_for_paper_size()
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
2018-04-25 16:28:07 +02:00
Daniel Mustieles
d20101e878 Update Spanish translation 2018-04-25 11:29:02 +00:00
Daniel Boles
af350b20b1 testentrycompletion: Avoid a compiler cast warning
Instead of getting the model again but then forgetting to cast it to a
ListStore, just use the other variable store where we already did both.
2018-04-24 13:43:18 +01:00
Stas Solovey
8535e2e417 Update Russian translation 2018-04-24 10:00:32 +00:00
Emmanuele Bassi
88b08c05c0 wayland: Allow a NULL inhibitors hash table
The shortcuts inhibitors hash table is created when we create a
GdkWaylandWindow implementation for a GdkWindow, and it's destroyed once
we finalize the instance. The fake "root" window we create for the
Wayland display does not have a backing native window, so the shortcuts
inhibitors hash table is set to NULL; this causes a critical error
message when calling g_hash_table_destroy() on it. The finalization of
the root window happens when we close a display connection.

We should use g_clear_pointer(), instead, as it's NULL safe.

Without this change, the displayclose test fails, as all warnings are
considered fatal.
2018-04-23 10:02:43 +01:00
Emmanuele Bassi
dad773b129 build: Do not dist generated files
We expect these files to be regenerated even when building GTK+ from a
release tarball, so there's no point in distributing them if they are
going to be ignored.
2018-04-23 09:13:41 +01:00
Emmanuele Bassi
07124b5e99 x11: Query whether we have GLX support
Epoxy 1.4 has new ad hoc API that we can use to check whether GLX is
available on the current system.

If we didn't use this API, we'd have to manually dlopen libGL (or its
equivalent on different OSes) and check if it had GLX symbols; since
Epoxy already does all of this internally, we can simply ask it instead.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
(cherry picked from commit 02eb344950)
Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
2018-04-23 09:13:41 +01:00
Emmanuele Bassi
ba883b55ee Bump up the dependency of libepoxy
We're going to use API introduced in libepoxy 1.4 to check for GLX
availability.

https://bugzilla.gnome.org/show_bug.cgi?id=775279
2018-04-23 09:13:41 +01:00
Daniel Boles
d35ecbb5a4 themes: Fix a new comment
bah.
2018-04-22 22:21:22 +01:00
Daniel Boles
a3cb26cad7 themes: Fix swapped borders on RTL PathBar buttons
.linked assumes the container is a GtkBox, which is documented as never
flipping children in RTL, so :first-child is always the left child, etc.
GtkBox does that by reordering its CSS nodes when the direction changes.

But most widgets don’t do that, so :first|last-child are 1st/last ADDED
and swap sides in RTL. GtkPathBar is so, and ignoring that in our themes
meant that in RTL, its left/right buttons got each other’s borders. Yuk!

This patch adds the groundwork for supporting widgets like that, via the
%linked_flippable placeholder, and applies that to override buttons in
  filechooser .path-bar.linked > button
so that the correct borders get applied to those buttons when using RTL.

Note that I select only PathBars within a FileChooser because we also
have NautilusPathBar, which also uses widget.path-bar – but *does* flip
its nodes for RTL already, so letting that get affected broke it again!

https://bugzilla.gnome.org/show_bug.cgi?id=772817
2018-04-22 22:05:09 +01:00
Daniel Boles
1ee80fa4c6 MenuButton: popover connects to menu_deactivate_cb
This was missed (even before my recent patches).

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:29:22 +01:00
Daniel Boles
db85e888c7 MenuButton: Disconnect newly added signal handler
Otherwise, we do stuff we shouldn't, as the failing pipeline showed:
https://gitlab.gnome.org/GNOME/gtk/pipelines/9431

https://gitlab.gnome.org/GNOME/gtk/issues/199
2018-04-22 16:29:20 +01:00